Prestashop: Category view: sorting by price incorrect

Created on 22 Aug 2019  路  6Comments  路  Source: PrestaShop/PrestaShop

Describe the bug
When sorting products with a discount by price, the order is sometimes incorrect, despite rebuilding the price index and clearing cache in BO.

To Reproduce
Steps to reproduce the behavior:

  1. Go to FO, choose a category with products with a discount
  2. Sort by price, low to high
  3. Check sorting order

Screenshots
image

Current sorting order:
23.16
23.98
23.98

23.96
23.96
23.98
23.98
25.48
24.98

Should be:
23.16
23.96
23.96
23.98
23.98
23.98
23.98
24.98
25.48

Additional information
PrestaShop version: 1.7.6.0
ps_facetedsearch version: 3.2.0
PHP version: 7.2.17

1.7.6.0 Bug FO Faceted search Fixed Major

Most helpful comment

@PierreRambaud, yes, I checked your PR & it is OK for me
https://drive.google.com/file/d/1CTY3q4xQqxdc63mxd-UbHBJ86zauBx0J/view
Thanks!

All 6 comments

Hi @Twabi2,

Thanks for your report.
I manage to reproduce the issue with PS1.7.6.0 & the ps_facetedsearch v3.2.0.
Stes to reproduce the issue:

  1. Create a catalog Catalog Price Rules with
    1.1. Reduction type = Percentage
    1.2. Reduction = 50
    1.3. Condition Group => Home
    image
  1. Go to the FO => Click on All products => Sort price
  2. Click on the second page
  3. see error

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!
Ping @PierreRambaud

Hey @khouloudbelguith can you try again, I'm not able to reproduce:
image
image

@Twabi2
Could you try to click on "Index all missing prices" and "Clear cache" in faceted search module ?

Hi @PierreRambaud,

I tried with PS1.7.6.1 & ps_facetedsearch v3.2.1.
Cache is cleared & Price is indexed
https://drive.google.com/file/d/1wrURuqmTKH7BgSCZa6LnwMWaj_KsNRi3/view
In this second shop "Price High to Low" is incorrect.

  • The product which is wrong: has a price 17.500000 Tax included
  • In my second shop the Tax is disabled & Catalof rule with reduction 50%

image

Thanks!

Can you tell me if with my new PR everything is ok for you? https://github.com/PrestaShop/ps_facetedsearch/pull/130

I also add a hook when Catalog Price Rules is set.

@PierreRambaud, yes, I checked your PR & it is OK for me
https://drive.google.com/file/d/1CTY3q4xQqxdc63mxd-UbHBJ86zauBx0J/view
Thanks!

Was this page helpful?
0 / 5 - 0 ratings