tout à fait, en fait c'est pas un module, c'est un petit bout de code à modifier , trouvé sur le forum english
je le remets pour infos
Remettre l’effet « fly to cart » dans la page produit
Remplacer dans product.tpl tous les scripts après a onclick="addToCart
Par :
- Code: Tout sélectionner
<script type="text/javascript"><!--
$('.fancybox').fancybox({cyclic: true});
//--></script>
<script type="text/javascript">$(document).ready(function(){
$('#button-cart').bind('click', function() {
$.ajax({
url: 'index.php?route=checkout/cart/update',
type: 'post',
data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'),
dataType: 'json',
success: function(json) {
$('.success, .warning, .attention, information, .error').remove();
if (json['error']) {
if (json['error']['warning']) {
$('#notification').html('<div class="warning" style="display: none;">' + json['error']['warning'] + '<span class="close"><img src="catalog/view/theme/theme005/image/close.png" alt="" class="close" /><span></div>');
$('.warning').fadeIn('slow');
}
for (i in json['error']) {
$('#option-' + i).after('<span class="error">' + json['error'][i] + '</span>');
}
}
if (json['success']) {
$('#cart_total').html(json['total']);
var image = $('#image').offset();
$('.cart-module').html(json['output']);
if($(".cart-module").length > 0){
var cart = $('.cart-module');
var cart_offset = cart.offset();
}else {
var cart = $('#cart');
var cart_offset = cart.offset();
}
$('#image').before('<img src="' + $('#image').attr('src') + '" id="temp" style="position: absolute; z-index:9999; top: ' + image.top + 'px; left: ' + image.left + 'px;" />');
params = {
top : cart_offset.top + 'px',
left : cart_offset.left + 'px',
opacity : 0.0,
width : cart.width(),
height : cart.height()
};
// uncomment line below if you also want to scroll up
$('html, body').animate({ scrollTop: 0 }, 'slow');
$('#temp').animate(params, 'slow', false, function () {
$('#temp').remove();
});
}
}
});
});
}); </script>