PrestaShop/blocksearch — pull request #1 by timsit (2014-10-24 11:11:08+00:00)
Title: [*] Project : refactoring all javascript s code about the module blockcart

Update: Solved merge issue of this one PrestaShop/PrestaShop#1829

Ok this is a big one.

It's a first step but really necessary. All the website I had to do with prestashop, the blockcart is allways the longer and the hardest part to integrate. Even if you want to just override the javascript from the template you have to read all the javascrpti code to copy past only the needed part and remove all the template-related interraction.

So the main idea here is to begin by separate the data part (ajax-cart.js) and the interaction part (blockcart.js). I also made a huge effort into the comment part for the ajax-cart.js functions.

With that you will just need to override the blockcart.js file and call the function from the ajax-cart.js. You don't need to go through a dirty javascript file to pull out the data call in way to interact with your custom template !

Every input is very welcome because for me the cart part of every shop I made is a least 30% of the time I past in the template part of a Prestashop.

Hope you will enjoy and contribute and sorry for my poor English ;)