How To Fix Prestashop 1.5. * Ajax Cart Bug In Internet Explorer

How To Fix Prestashop 1.5. * Ajax Cart Bug In Internet Explorer

In the first versions of Prestashop 1.5.* there is a bug which is reproduced in old versions for all browsers as well as in all Internet Explorer versions. This bug does not allow to save cookies when adding a product to the cart if the Block Cart module is enabled, thus your shopping cart remains empty. To fix this you need to modify the js-file /modules/blockcart/ajax-cart.js:

  1. Comment out the following condition in the method аjаxCаrt.add( ):
  2. Place an аjаx-request in the method аjаxCаrt.expand() before slideUp is invoked.
  3. Then set the same аjаx request for a synchronous execution, i.e.set the async option as false, instead of true.

After that clear your browser cookies.



4 comments

  1. Hi Denis,

    Thanks for the explanation. Could I ask you for a bit more detail as I am trying to fix this problem and I do not fully understand your solution. Could you explain steps 2 and 3 for me in a bit more detail please? What exactly do you mean Place an аjаx-request in the method аjаxCаrt.expand() before slideUp is invoked? I am not much of a programmer but I need to solve this annoying problem in IE. Thanks again.

  2. Hi Denis, I just read your article of how to fix the “Ajax cart bug” in Internet Explorer, I’m developing a prestashop-based store and have exactly the same problem that you described on your post, can you please show what you mean in steps 2 and 3. I think it will be apreciated by all of us!! Thanks!!!

  3. lordbdp,

    The problem is that some of the functions in the object ajaxCart send parallel ajax-requests and that causes problems with cookies in IE old versions. This method of organizes these requests sequentially.

Post a new comment

top
BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *