Prestashop: Strange round price for modules

Created on 17 Jul 2019  Â·  10Comments  Â·  Source: PrestaShop/PrestaShop

Describe the bug
I have some strange module prices displayed on PS 1.7.6.0.
French BO in Euro (€).
Some prices are : 29.990000000000002 € (see screenshot below).

To Reproduce
Steps to reproduce the behavior:

  1. Go to Modules > Catalog of Modules
  2. See strange prices for some modules

Screenshots
module-prices

Additional information
PrestaShop version: 1.7.6.0
PHP version: 7.2

1.7.5.2 1.7.6.0 1.7.6.1 BO Bug Fixed MBO Minor Modules Modules catalog

All 10 comments

Hi @Klemart3D,

Thanks for your report.
This issue seems related to https://github.com/PrestaShop/PrestaShop/issues/14608.
Could you please try to replace precision to 2 in the table ps_currency, clear cache, check & feedback.

Thanks!

Yes it related, my current instance is an upgrade from PS 1.7.5.1 to 1.7.6.0 and I'm in the second case of #14608.

Before upgrade, my ps_currency table was:

id_currency | name | iso_code | conversion_rate | deleted | active
--------------- | ------- | ------------ | -------------------- | --------- | -------
1| 'euro'| 'EUR'| 1.000000| 0| 1

Now it is:

id_currency | name | iso_code | numeric_iso_code | precision | conversion_rate | deleted | active
--------------- | ------- |-------------|---------------------------| ------------- | -------------------- | --------- | -------
1|euro|EUR| 0|6|1.000000| 0| 1

I changed precision from 6 to 2 and cleared cache but bug still persists :

bug-price2

Seems only for module displaying the specific price of 29.99 (not for other prices).

@Klemart3D, thanks for your feedback.
In your BO => Shop Parameters => General page => the number of decimals is set to 2?
Thanks!

Yes, set to 2 decimals. But it's not specific to my shop, I can found same bug on your official demo Prestashop website:
bug-price3

This information is provided by the marketplace:

image

@khouloudbelguith IMO this issue has been fixed with 1761, can you confirm we can close this issue ?

Hi @colinegin,

No, I manage to reproduce the issue with PS1.7.6.1.
https://drive.google.com/file/d/1h0hNpneVqLhk9NLAzHD5JNYrNGUhWC4C/view
Thanks!

I think this is fixed in ps_mbo v2.0.0

@PrestaShop/prestashop-qa Could you check if it's well fixed with ps_mbo v2.0.0 and close this issue if it is ?

The problem is fixed with ps_mbo v2.0.0

Was this page helpful?
0 / 5 - 0 ratings