TrevStacker
TrevStacker

Reputation: 1

Magento continue shopping - Specific url

I've tried hardcoding the getContinueShoppingUrl in cart.phtml to send to a specific url, which worked fine. But an 'empty cart page' seems to be pulling the url from Cart.php which makes me think it's just easier to edit that url and remove my hardcoding.

So my question is, how can I edit the public function getContinueShoppingUrl() in Cart.php to feed both of these Continue Shopping Urls?

I'm pretty new to this, so go easy ;)

Upvotes: 0

Views: 592

Answers (1)

Josh Pennington
Josh Pennington

Reputation: 6408

In editing Magento code, I have found that grep-ing the codebase is an effective way to find what you are looking for. In this case:

grep "getContinueShoppingUrl(" . -r

Will search for all the instances of the text in the files. I usually like to run this from the /app directory instead of the root directory of Magento.

To answer your question the function you are looking for is in the /app/code/core/Mage/Checkout/Block/Cart.php file.

Do not edit this file directly! Copy it to the local code pool!

Upvotes: 1

Related Questions