Try the Demo

Magento Forum

   
How to change the target link of Checkout button in My Cart? 
 
tmoerkerken
Jr. Member
 
Total Posts:  4
Joined:  2012-08-21
 

I want the Checkout button in the My Cart sidebar to link to the Shopping Cart and not to the direct checkout cart page. How do I change the target link? Where can I find the file to edit this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
magestore
Enthusiast
 
Avatar
Total Posts:  961
Joined:  2009-08-07
Viet Nam
 

Hello,
To change the link of the Checkout button in the My Cart sidebar to link to the Shopping Cart instead of Checkout/Onepage, you can edit the code in file: app/design/frontend/default/your_custom_theme/template/checkout/cart/sidebar.phtml (or app/design/frontend/base/default/template/checkout/cart/sidebar.phtml).
Find the code:

<?php if($_cartQty && $this->isPossibleOnepageCheckout()): ?>
    
<div class="actions">
        
<?php echo $this->getChildHtml('extra_actions'?>
        
<button type="button" title="<?php echo $this->__('Checkout') ?>" class="button" onclick="setLocation('<?php echo $this->getCheckoutUrl() ?>')"><span><span><?php echo $this->__('Checkout'?></span></span></button>
    </
div>
    
<?php endif ?>

and change to:

<?php if($_cartQty && $this->isPossibleOnepageCheckout()): ?>
    
<div class="actions">
        
<?php echo $this->getChildHtml('extra_actions'?>
        
<button type="button" title="<?php echo $this->__('Checkout') ?>" class="button" onclick="setLocation('<?php echo $this->getUrl('checkout/cart'); ?>')"><span><span><?php echo $this->__('Checkout'?></span></span></button>
    </
div>
    
<?php endif ?>

Hope it helps!

 Signature 

Mega Menu brings flexible configuration to store’s navigation Menu
Magento Extensions and Templates: Affiliate, Store pickup, Gift-wrap, Gift voucher, 1stepcheckout, Auction…
Magento Affiliate - Full-functioned Magento extension to run Affiliate program at $99

 
Magento Community Magento Community
Magento Community
Magento Community
 
tmoerkerken
Jr. Member
 
Total Posts:  4
Joined:  2012-08-21
 

Thanks you so much! It worked.

 
Magento Community Magento Community
Magento Community
Magento Community
 
karisletten
Jr. Member
 
Total Posts:  2
Joined:  2012-10-15
 

Using Magento 1.7. Worked perfect. Thanks so much!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top