Change checkout link

Hi,

I would like to ask how to modify the checkout link in the "top link" and also the checkout button inside the floating shopping cart so that when clicked, it will go to checkout/cart instead of the checkout/onepage.

In general I would like to go to the cart first as that is the only place customers can enter coupon.

Thanks in advance.

1 answer

Profile photo of Seoki Lee 1510.00 $tone April 1, 2014
Public

1. To change checkout link to shopping cart link, please open the ..\app\design\frontend\default\jm_sportsgear\layou t\checkout.xml file:

At line 38, change this code:

Code:

<reference name="top.links">
	<block type="checkout/links" name="checkout_cart_link">
		<action method="addCartLink"></action>
		<action method="addCheckoutLink"></action>
	</block>
</reference>

To:

Code:

<reference name="top.links">
	<block type="checkout/links" name="checkout_cart_link">
		<action method="addCartLink"></action>
		<action method="addLink" translate="label title"><label>Checkout</label><url helper="checkout/url/getCartUrl"/><title>Checkout</title><prepare/><urlParams/><position>50</position></action> 
	</block>
</reference>

2. To change link of checkout button, please open the ..\app\design\frontend\default\jm_sportsgeartempl ate\checkout\cart\sidebar2.phtml file

At line 81, change this code:

Code:

<button type="button" title="<?php echo $this->__('Checkout') ?>" class="button btn-checkout" onclick="setLocation('<?php echo $this->getCheckoutUrl() ?>')"><span><span><?php echo $this->__('Checkout') ?></span></span></button>

To:

Code:

<button type="button" title="<?php echo $this->__('Checkout') ?>" class="button btn-checkout" onclick="setLocation('<?php echo $this->getUrl('checkout/cart') ?>')"><span><span><?php echo $this->__('Checkout') ?></span></span></button>

Hope this helps.

#1

Please login or Register to Submit Answer

Written By

Comments