Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Category view: sorting by price incorrect #15223

Closed
Twabi2 opened this issue Aug 22, 2019 · 6 comments

Comments

@Twabi2
Copy link

@Twabi2 Twabi2 commented Aug 22, 2019

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

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor

@khouloudbelguith khouloudbelguith commented Aug 22, 2019

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

  2. Go to the FO => Click on All products => Sort price

  3. Click on the second page

  4. see error

image
I’ll add this to the debug roadmap so that it’s 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

@PierreRambaud

This comment has been minimized.

Copy link
Contributor

@PierreRambaud PierreRambaud commented Sep 2, 2019

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

@marionf

This comment has been minimized.

Copy link
Contributor

@marionf marionf commented Sep 2, 2019

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

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor

@khouloudbelguith khouloudbelguith commented Sep 2, 2019

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!

@PierreRambaud

This comment has been minimized.

Copy link
Contributor

@PierreRambaud PierreRambaud commented Sep 2, 2019

Can you tell me if with my new PR everything is ok for you? PrestaShop/ps_facetedsearch#130

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

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor

@khouloudbelguith khouloudbelguith commented Sep 2, 2019

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

@marionf marionf added this to To do in Native modules integration via automation Sep 11, 2019
@marionf marionf moved this from To do to To be tested in Native modules integration Sep 11, 2019
@sarahdib sarahdib moved this from To be tested to To be merged in Native modules integration Sep 12, 2019
@sarahdib sarahdib added Fixed and removed To Do labels Sep 12, 2019
@marionf marionf closed this Sep 12, 2019
Native modules integration automation moved this from To be merged to Done Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
5 participants
You can’t perform that action at this time.