Prestashop: [BOOM-2409] sort by price sorts only products on this page but not in whole category

Created on 23 Aug 2018  ·  25Comments  ·  Source: PrestaShop/PrestaShop

This issue has been migrated from the Forge. Read the original ticket here.

  • _Reporter:_ icydrago
  • _Created at:_ Fri, 10 Feb 2017 21:48:38 +0100

When you have products with attributes for some pages in category and select sort by price, sorting is absolutely unexpected.

  • How to reproduce the issue ?

All my products have 2 attributes that effects on price. Combination with the lowest price set as default.


With my other products with 2 other atributes sorting is normal...


I can give access to see this issue.

1.7.4.0 1.7.4.1 Bug FO Faceted search Fixed L Major Products

All 25 comments

This comment has been migrated from the Forge. Read the original comment here.

  • _Author:_ vincentbz
  • _Created at:_ Mon, 13 Feb 2017 11:53:52 +0100

Salut,

Est ce que tu pourrais essayer de reproduire stp ?

Merci !

This comment has been migrated from the Forge. Read the original comment here.

  • _Author:_ byangui
  • _Created at:_ Mon, 13 Feb 2017 18:13:41 +0100

Salut Vincent Beudez,

Oui j'ai pu reproduire le bug.

Scénario de reproduction de bug:
1- Installer PrestaShop
2- Accéder à la page des produits affichés par catégorie en Front Office
Par défaut, il y a 7 produits de démo dont deux articles :

  • Robe d'été imprimée (ref: demo_5) : prix = 36.6 € et réduit de 5% => Prix = 34.77 €
  • Robe d'été imprimée (ref: demo_6) : prix = 36.6 € (pas de réduction)
    3 - Faire un tri par prix décroissant => le tri se passera bien : demo_6 apparaît avant demo_5
    4 - Rendre le nombre de produits par page (en BO) égal à 2
    5 - demo_5 sera dans la page 1 et demo_6 dans la page 2 : la réduction n'a plus d'effet

NB: Le bug existe actuellement dans la branche develop

This comment has been migrated from the Forge. Read the original comment here.

  • _Author:_ aleeks
  • _Created at:_ Fri, 17 Feb 2017 14:19:23 +0100

Hello,
comment tu as fais Basma Yangui, regarde mes deux images.

This comment has been migrated from the Forge. Read the original comment here.

  • _Author:_ byangui
  • _Created at:_ Fri, 17 Feb 2017 14:29:47 +0100

Hi Alex Sampaio,

Oui, il faut rendre le nombre de produits par page 2 et non pas 5 à l'étape 4 (c'est une faute dans mon scénario de reproduction de bug).

This comment has been migrated from the Forge. Read the original comment here.

  • _Author:_ aleeks
  • _Created at:_ Fri, 17 Feb 2017 14:55:23 +0100

Hello, de la manière de comment est construit la manière de requête, c'est pas possible de fixer ça.
La raison, c'est que le prix en promo est "trouvé" après la requête sql où l'on re-tris avec getStaticPrice... sauf qu'on est déjà limité pour la pagination.

This comment has been migrated from the Forge. Read the original comment here.

  • _Author:_ icydrago
  • _Created at:_ Fri, 17 Feb 2017 16:07:57 +0100

Sorting from low to high price on every single page is normal. But the second and other pages have products with lower price than the highest on first page.

This comment has been migrated from the Forge. Read the original comment here.

  • _Author:_ x-us
  • _Created at:_ Mon, 22 Jan 2018 13:20:35 +0100

It is probably the same as

http://forge.prestashop.com/browse/PSCSX-7452

This comment has been migrated from the Forge. Read the original comment here.

  • _Author:_ alban.legout
  • _Created at:_ Wed, 11 Apr 2018 10:05:21 +0200

see ps_facetedsearch module

This comment has been migrated from the Forge. Read the original comment here.

  • _Author:_ fabiorme
  • _Created at:_ Wed, 11 Jul 2018 13:30:21 +0200

I had read that the problem would be solved in version 1.7.4, unfortunately it is not so, even in this version the products are sorted by price on the single page and not in the whole category, we know when the problem will be solved?

This comment has been migrated from the Forge. Read the original comment here.

  • _Author:_ khouloud.belguith
  • _Created at:_ Wed, 11 Jul 2018 14:18:59 +0200

Hi Fabio Ruggeri,

There are some major issues to solve before this one.
So, it will probably not solved right now.
But PrestaShop is an open source project, so it can be solved before if someone submits a pull request to solve it.

Best regards, Khouloud

This comment has been migrated from the Forge. Read the original comment here.

  • _Author:_ khouloud.belguith
  • _Created at:_ Tue, 24 Jul 2018 12:16:19 +0200

Hi icydrago,

I did not manage to reproduce the issue with the last version 1.7.4.1/ develop branch & the Faceted search v2.1.2.

Thanks to check this issue with the last version and feedback.

Best regards, Khouloud

This comment has been migrated from the Forge. Read the original comment here.

  • _Author:_ javiermc
  • _Created at:_ Fri, 27 Jul 2018 06:54:28 +0200

Hi Khouloud BELGUITH.

I think the problem comes from the specific prices and the sort by price.
I did video, maybe help you.

http://recordit.co/CRSLVlVvHz (no audio)

I come of related incident: http://forge.prestashop.com/browse/BOOM-4665.

Best regards, Javier.

 

This comment has been migrated from the Forge. Read the original comment here.

  • _Author:_ marion_francois
  • _Created at:_ Fri, 27 Jul 2018 10:21:52 +0200

Hello Khouloud BELGUITH

Please look screenrecord3.mkv it's on 1.7.4.1 and it happens also with simple product

And I have uninstalled faceted search module, so it's not related to this module

This comment has been migrated from the Forge. Read the original comment here.

  • _Author:_ khouloud.belguith
  • _Created at:_ Fri, 27 Jul 2018 12:35:54 +0200

Hi Marion F,

New fresh install 1.7.4.1 => OK (faceted search module installed => OK / faceted search module uninstalled => OK)
https://drive.google.com/file/d/1ZlYYAuIZhg29kM_GlMWPVHVM05hy2ojX/view

Best regards, Khouloud

@PierreRambaud you are assigned for the ticket on the forge. Are you still assigned to this Issue ?

@matks Not really, I never reproduce the bug with latest version of faceted search, thinking this one was closed.

I can reproduce the following behavior:

  • add a specific price to a product, targeting one combination of this product, the price is -90%
  • make this combination the combination by default for this product
  • go on "all products" page, sort by descending price

The discounted product appears at the end of the displayed results on this page.

This is not relevant because on the 2nd page, the price of the 1st item displayed is higher.


I have module ps_facetedsearch v2.1.2 and I confirm the "all products" page search results is performed by the module.

If I uninstall module ps_facetedsearch, the search is performed by CategoryProductSearchProvider and the bug is still here.

After analysis, it turns out that the product search being performed by the module ps_facetedsearch (or, if the module is uninstalled, by prestashop) is able to use some specific prices, but not all of them.

For example a "specific price for all people in country X" seems to modify the search results but a "specific price for combination Y" seems not.

Issue is a lot more complex than expected, it needs a lot of work to be done.

@matks do you have any idea of what could been done to fix this issue ? Last time there was no real solution.

@colinegin I see no "light" bug fix. To really fix the bug, I think we need to rework the internal processing of faceted search which is a heavy task.
I dont think this can be done for 1.7.5, and if we want to fix this bug for 1.7.6 we better start ... now 😅

Thanks @matks for your answer, unfortunately that's what I thought 👎
As discussed with the QA team, we will not be able to fix it for the 1.7.6 version, as we already have top watchers issues in the roadmap.

Any news about this problem solution? i see it was removed from the 1.7.6.0

Hey @darslu, as you can see, we plan to integrate it in the 1.7.6 with the new Faceted search module :)

Was this page helpful?
0 / 5 - 0 ratings