I'm trying to build a very simple template, there are only 3 products so I want the add to cart button both from the category page and product page to add the product and go straight to the shopping cart...Is there a quick way around this?
Thank you in advance.
open: catalog/view/theme/default/template/product/product.tpl
find
change to
open: catalog/view/javascript/common.js
find
change to
find
Code: Select all
if (json['success']) {
$('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');
$('.success').fadeIn('slow');
$('#cart_total').html(json['total']);
$('html, body').animate({ scrollTop: 0 }, 'slow');
}
Code: Select all
if (json['success']) {
location.href = 'index.php?route=checkout/cart';
}
find
Code: Select all
if (json['success']) {
$('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');
$('.success').fadeIn('slow');
$('#cart_total').html(json['total']);
$('html, body').animate({ scrollTop: 0 }, 'slow');
}
Code: Select all
if (json['success']) {
location.href = 'index.php?route=checkout/cart';
}
Who is online
Users browsing this forum: No registered users and 4 guests