Prestashop: Currency rate changes are not reflected in render

Created on 12 Jan 2020  路  4Comments  路  Source: PrestaShop/PrestaShop

Assign currency rate to all templates, otherwise when rate changes, prices with old rates may be displayed if the page is in the cache.

see:
https://github.com/PrestaShop/PrestaShop/blob/cfe92813cc51397f21b0fb4a2108bd410c54a3b0/classes/controller/FrontController.php#L491
https://github.com/PrestaShop/PrestaShop/blob/cfe92813cc51397f21b0fb4a2108bd410c54a3b0/classes/controller/FrontController.php#L1563

It seems that also tax rates and other variables need to be added to prevent caching of not-up-too-date data.

Edit by Khouloud

Prerequisites:

  • enable cache
  • at least one additional currency added/enabled

Steps to reproduce:

  • open homepage and change currency to some non-main currency
  • open the homepage and notice the prices (this cache the page)
  • change the currency rate in BO
  • refresh homepage and notice, that the prices are unchanged
1.7.5.2 1.7.6.3 Bug Currencies FO Major Performance Taxes and Prices To Do

All 4 comments

Hi @mvorisek,

Thanks for your report.
Could you please add steps to reproduce the issue in a new comment.

Thanks!

Prerequisites:

  • enable cache
  • at least one additional currency added/enabled

Steps to reproduce:

  • open homepage and change currency to some non-main currency
  • open homepage and notice the prices (this cache the page)
  • change the currency rate in BO
  • refresh homepage and notice, that the prices are unchanged

@mvorisek, thanks for these clarifications.
I manage to reproduce the issue with PS1.7.5.2 & PS1.7.6.3
https://drive.google.com/file/d/1rEwZeH2BoALxfOVl_7caHjlKGzMA7uJi/view
This issue is reproduced only when Cache is enabled
image
I鈥檒l add this to the debug roadmap so that it鈥檚 fixed. If you have already fixed it on your end or if you think you can do it, please do send us a pull request!
Thanks!

@khouloudbelguith Can this be prioritized? Displaying bad prices is major issues.

Was this page helpful?
0 / 5 - 0 ratings