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?