Jump to content

Product price sort decimal not works in 1.7.6


pujionodk

Recommended Posts

Hi, I just update my prestashop 1.7.5.x to 1.7.6

My product sort price gone wrong with decimal, price low to high or price high to low.
I did clear performance cache ; faceted search : ndex missing price, rebuild entire price index ; clear browser cache

1) price low to high
- 21,388.51 then 21,388.50 (wrong)
- 25,753.52 then 21,753.50 (wrong)
152500080_price-lowtohigh.thumb.JPG.bd11522235d56a71e951cea5ef841f1e.JPG

2) Price High to Low
- 25,753.00 then 25,753.52 (wrong)
- 21,388.51 then 21,388.50 (true)

166685456_price-hightolow.thumb.JPG.f042f16f0a79596b27f5f0ba26e38833.JPG

 

My decimal setting in backoffice :
- round mode : round up away from zero, when it is half way there (recommended)
- round type : round each item

- decimal number : 2

 

 

Link to comment
Share on other sites

12 hours ago, JBW said:

Hi,

this is a known 1.7.6. bug. Check out the details here - you can correct it in database table ps_currency

https://github.com/PrestaShop/PrestaShop/issues/14608

I changed the precision from 6 to 2.
But the price order still not works correctly with decimal precision

I did change numeric_iso_code from 0 to my currency code based on  https://en.wikipedia.org/wiki/ISO_4217
Still decimal order not works

Edited by pujionodk (see edit history)
Link to comment
Share on other sites

On 8/13/2019 at 4:44 PM, jeanluc.12 said:

Have you cleared the cache after updating the price in the DB?

 

Yes, I reindex all missing prices, rebuild entire price index in faceted search. Clear cache in performance.
And delete prod directory in \var\cache and delete browser cache

 

I think because in layered_price_index table, price_min and price_max is integer that make the sort order with decimal not works

Edited by pujionodk (see edit history)
Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...