If you wish to repoint the “continue shopping” button in the shopping cart, then the file
app/code/core/Mage/Checkout/Block/Cart.php (and don’t forget that the modified file should be copied to app/code/local/Mage/Checkout/Block/Cart.php ) is one place to do that from. (The code example below gives different results based on if the cart is empty or not)
71 72 73 74 75 76 77 78 79 80 81 82 83 | public function getContinueShoppingUrl() { //Mage::getUrl(page name in CMS under admin) //if the cart is not empty, return the user to the shop if (Mage::helper('checkout/cart')->getCart()->getItemsCount() > 0) $url = Mage::getUrl('home'); //if the cart is empty, return the user to the portal home. else $url = Mage::getUrl('portal'); $this->setData('continue_shopping_url', $url); return $url; } |
Also you should edit the file app/design/frontend/default/blank/template/checkout/cart/noItems.phtml (blank is my skin)
33 | <p><?php echo $this->__('Please <a href="%s">continue shopping</a>.', Mage::getUrl('portal')) ?></p> |
[This was done to Magento version 1.3.2.4]
Jontas – Thanks for this – Will it work in magento v1.4.01 or do you do custom work to fix it?
Thanks for your time,
John
Hi. Not sure, I have moved on to other projects after the Magento one, so I would not know if this would work for other versions or not.