AntonLejon Posted May 6, 2013 Share Posted May 6, 2013 Hello! I'm very new with Prestashop, and I'm also new to the whole open source thing - at least in terms of contributing. I'm loving Prestashop so far. The version I'm using is 1.5.3.1, so this might be fixed already, but I noticed an inefficiency when using the ajax cart. The animated object isn't removed when it's done animating and hidden, which isn't the biggest of problems, but when adding products multiple times it can hog the computer if the image is complex enough (like a partly transparent png). This is easily fixed by adding $(this).remove(); after line 231 in modules/blockcart/ajax-cart.js. The whole animation function ends up looking like this: // Check if the block cart is activated for the animation if (cartBlockOffset != undefined && $picture.size()) { $picture.appendTo('body'); $picture.css({ 'position': 'absolute', 'top': $picture.css('top'), 'left': $picture.css('left'), 'z-index': 4242 }) .animate({ 'width': $element.attr('width')*0.66, 'height': $element.attr('height')*0.66, 'opacity': 0.2, 'top': cartBlockOffset.top + 30, 'left': cartBlockOffset.left + 15 }, 1000) .fadeOut(100, function() { ajaxCart.updateCartInformation(jsonData, addedFromProductPage); $(this).remove(); }); } else ajaxCart.updateCartInformation(jsonData, addedFromProductPage); I don't know how to submit code to the repository and such things. Would anyone care to explain how to do that? Thank you, and have a nice day! Best regards, Anton 1 Link to comment Share on other sites More sharing options...
vekia Posted May 6, 2013 Share Posted May 6, 2013 here is a prestashop github: https://github.com/PrestaShop/PrestaShop before you will send own contributions read: http://doc.prestashop.com/display/PS14/Development+standard submission tips etc. http://www.prestashop.com/blog/en/what-need-know-prestashop-github/ how to send contribution to github: https://help.github.com/articles/using-pull-requests 1 Link to comment Share on other sites More sharing options...
AntonLejon Posted May 6, 2013 Author Share Posted May 6, 2013 Thank you Vekia, that's just what I was looking for! Link to comment Share on other sites More sharing options...
vekia Posted May 6, 2013 Share Posted May 6, 2013 you're welcome Happy contributing ;-) i marked thread as solved regards Link to comment Share on other sites More sharing options...
Recommended Posts