товар добавляется. анимации нет.
подскажите, что не так:
common.js
function addToCart(product_id, quantity) {
quantity = typeof(quantity) != 'undefined' ? quantity : 1;
$.ajax({
url: 'index.php?route=checkout/cart/add',
type: 'post',
data: 'product_id=' + product_id + '&quantity=' + quantity,
dataType: 'json',
success: function(json) {
$('.success, .warning, .attention, .information, .error').remove();
if (json['redirect']) {
location = json['redirect'];
}
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: none }, 'slow');
// АНИМАЦИЯ КОРЗИНЫ
var image = $('#image_'+product_id).offset();
var cart = $('#cart').offset();
$('#image_'+product_id).before('<img src="' + $('#image_'+product_id).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 : $('#cart').width(),
height : $('#cart').height()
};
$('#temp').animate(params, 'slow', false, function () {
$('#temp').remove();
});
// АНИМАЦИЯ КОРЗИНЫ
}
}
});
}
category.tpl
<div class="image"><a href="<?php echo $product['href']; ?>"><img id="image_<?php echo $product['product_id']; ?>" src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div>