Skip to content
Advertisement

PrestaShop: How to refresh cart after creating specifc price

I have small problem 😉 I working with PrestaShop 1.7.6.9 (manual instaltion on shared hosting) and 1.7.7.1 (docker image from PrestaShop) I create module where price is calculated via code and saved in DB via SpecificPrice class. Saving work excellent, but I have other problem. When i go to cart product priced didn’t change. But when I wait some time and refresh the cart page, product price is changed for specific price.

My Specific Price code

JavaScript

I found same problems in topics on prestashop forum, but without the answer

I try with:

JavaScript

And i try update Cart via update method.

Has anyone had a similar problem?

Advertisement

Answer

After talk on pm with @KrystianPodemski, where he suggest change date from in specific price for 0000-00-00 00:00:00 and… it works 🙂 Now code for new specific price is:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement