Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

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
Mentor
 
Avatar
Total Posts:  1015
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!

 
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