I want to disable the ajax checkout in opencart 1.5.
I want the user to go straight to checkout when they add to cart.
Any help would be greatly appreciated!

Code: Select all
<a title="<?php echo $text_cart; ?>: <?php echo $text_items; ?>"><span id="cart_total"><img alt="<?php echo $text_cart; ?>" src="catalog/view/theme/partneris/image/cart_7dots2.png"/></span></a>
Code: Select all
<a><span id="cart_total"><?php echo $text_items; ?></span></a>
Guntis
Partneris.lv - opencart web site development and support
Code: Select all
<a class="button" onclick="addToCart('73');">
Code: Select all
<a class="button" onclick="addToCart('73');window.location='index.php?route=checkout/cart';">
Working on hebrew rtl opencart 1.5.0.5v http://automoto.co.il
Code: Select all
function RedirectToCart(){
window.location='index.php?route=checkout/cart';
}
Code: Select all
<a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button">
Code: Select all
<a onclick="addToCart('<?php echo $product['product_id']; ?>');setTimeout('RedirectToCart()',2000);" class="button">
Working on hebrew rtl opencart 1.5.0.5v http://automoto.co.il
If you haven't tested your code yet, then why in heaven's name do you post it?oleg wrote:Hi, this is my first postanyways, today I've spent an hour or so to find a solution on how to redirect a client to the cart page when pressed "add to cart".
I'm using 1.5.0.5v, there is no way to do it from the admin panel like in earlier versions.
I have seen different php based solutions that haven't worked for me, so I came with my own javascript based solution.
The idea is very simple. You just have to append a redirect command to onclick event.
instead of
useCode: Select all
<a class="button" onclick="addToCart('73');">
or (not tested yet) if there are no onclick event, just add one with the redirect, or just add the redirect at the end of the addToCart functionCode: Select all
<a class="button" onclick="addToCart('73');window.location='index.php?route=checkout/cart';">
Users browsing this forum: Bing [Bot] and 19 guests