On my category page, if the user clicks "Add to Cart", then I want to add that product to their cart and then redirect to a CMS page.

I've seen the other solutions available, but none of them seem to address the situation from the category view - only from the product page itself.

Currently, the Add to Cart button uses onclick="setLocation('<?php echo $addCartUrl; ?>')" where $addCartUrl = $this->getAddToCartUrl($_product);

This addCartUrl redirects automatically to /checkout/cart.

How can I redefine the redirect for category pages only?


You can disable the checkout/cart redirection after add to cart in admin panel.

System » Configuration » Checkout » Shopping Cart » "After Adding a Product Redirect to Shopping Cart"

If you want to redirect specific page after add to cart .you can use following event

  • The above comment was before the post was edited. Current answer works well.
    – travisw
    Jul 17 '15 at 19:48
  • This my simple cms page, add to cart not working could you pls help me solve this issue -> code justpaste.it/40ryd
    – Gem
    Aug 16 '18 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.