If i choose a product and i choose "add to cart", the backet is not updated in teh layout, and refresh when i change the page. I am the only to have this problem?
try in the demo frontend
http://demo.opencart.com/index.php?rout ... duct_id=41
if a click one time or two , the basket is not always update
Thank you
The current fix is:
Script: catalog/view/theme/default/template/module/cart.tpl
Script: catalog/view/theme/default/template/module/cart.tpl
Code: Select all
$(document).ready(function () {
$('#add_to_cart').replaceWith('<a onclick="" id="add_to_cart" class="button">' + $('#add_to_cart').html() + '</a>');
$('#add_to_cart').click(function () {
$.ajax({
type: 'post',
url: 'index.php?route=checkout/cart',
data: $('#product :input'),
success: function(){
$('#module_cart .middle').load('index.php?route=module/cart/callback');
}
});
var image = $('#image').offset();
var cart = $('#module_cart').offset();
$('#image').before('<img src="' + $('#image').attr('src') + '" id="temp" style="position: absolute; top: ' + image.top + 'px; left: ' + image.left + 'px;" />');
params = {
top : cart.top + 'px',
left : cart.left + 'px',
opacity : 0.0,
width : $('#module_cart').width(),
heigth : $('#module_cart').height()
};
$('#temp').animate(params, 'slow', false, function () {
$('#temp').remove();
});
});
});
Who is online
Users browsing this forum: No registered users and 4 guests