Reputation: 6251
Is there any setting in magento backend to change continue shopping url ? If there any settings is there let me know How I can change. I am using Magento 1.7.x
Upvotes: 1
Views: 7807
Reputation: 11
To change redirect url of continue shopping button in "NOT" empty shopping cart just add the second code line following highlighted with asterix ** in ...your_theme/default/checkout/cart.phtml:
<?php if($this->getContinueShoppingUrl()): ?>
**<?php $this->setContinueShoppingUrl('http://yoursite.com/...'); ?>**
<button type="button" title="<?php echo $this->__('Continue Shopping') ?>" class="button btn-continue" onclick="setLocation('<?php echo $this->getContinueShoppingUrl() ?>')"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
<?php endif; ?>
cheap & effective
Thanks to previous answer/hint
Upvotes: 1
Reputation: 422
Sadly not, I've always wondered why this hasn't been in the configuration. You have two choices, you can either extend Mage_Checkout_Block_Cart
to apply logic to determine what URL to use or you can set the the URL in the template.
<?php $this->setContinueShoppingUrl('http://URL.com'); ?>
<div class="page-title">
<h1><?php echo $this->__('Shopping Cart is Empty') ?></h1>
</div>
<div class="cart-empty">
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
<p><?php echo $this->__('You have no items in your shopping cart.') ?></p>
<p><?php echo $this->__('Click <a href="%s">here</a> to continue shopping.', $this->getContinueShoppingUrl()) ?></p>
</div>
However, if you're going to set it in the template, you might as well just remove change <?php echo $this->__('Click <a href="%s">here</a> to continue shopping.', $this->getContinueShoppingUrl()) ?>
to <?php echo $this->__('Click <a href="http://URL.COM">here</a> to continue shopping.') ?>
Upvotes: 3