Jump to content

[solved] Small contribution / question - how to?


Recommended Posts

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

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...