Jump to content

Edit History

Mehrshad Zakerian

Mehrshad Zakerian


Updating the solution

Update - Jan 14, 2023

------------

Finally found the solution which works without needing any file replacement or any advanced steps (thanks to our friend response Nawres). Follow the steps below:

Before I continue to explain the steps, if you have changed your core.js file or you have replaced it with older versions (e.g. PS1.7.7.x, etc) remove it and upload the original core.js file which is within default PrestaShop file (exact the same with your PS version) then follow the rest of instructions.

Step 1: Open your core.js file which is inside your themes directory and edit it.

Step 2: Search for code below:

o.default.cart=e.resp.cart;

And replace it with:

o.default.cart=e.reason.cart;

Step 3: Reset your ps_shoppingcart module from your BO -> Modules.

Step 4: Go to your BO -> Advanced Parameters -> and click on Clear Cache button.

Step 5: Go to your store front-office, press Ctrl+Shift+R (or ⌘+shift+R on mac) to refresh your browser cookies.

You're done!

 

Mehrshad Zakerian

Mehrshad Zakerian

Well today I received some reports from clients which were using PS1.7.8.x that when they click on Add To Cart button it needs a manual refresh to update the quantity inside Cart module. Also there was the same issue for deleting a product from cart. It seems that there are some changes on "core.js" file which prevent themes developed by other developers (not default theme) to auto refresh cart changes.

I searched for the solution which I found this topic and one from Stack Overflow. Here is the solution which worked for me finally:

(Please make sure you have backed up everything before any changes)

  1. I replaced the core.js file from PS1.7.7.8 with my current file inside themes folder (thanks to @dimtsef)
  2. I reseted the ps_shoppingcart module (thanks to AuRum for their answer at Stack Overflow)
  3. I cleared PS cache (you can do it manually by removing prod and dev folders inside var/cache directory)

And it is working fine now!

×
×
  • Create New...