In current state, there is a huge mess in a way product sorting options are defined and configured.
Context
How it behaves
Proposed solution
Merchant should be able to set up default sorting for each controller and for faceted search module.
Thanks for opening this issue! We will help you to keep its state consistent
Hi @Hlavtox,
Thanks for your report.
Is it your issue similar to this: https://github.com/PrestaShop/PrestaShop/issues/14210
, but in the sort options list there is only price asc, price desc, name asc, name desc and position. And position is selected.
With PS1.7.6.7., I have an empty box selected
Thanks to check and feedback.
@khouloudbelguith The white box is a matter of template, ok.
The bigger question is still in, there is a mess in it, I think.
There are sort ways in BO that are not available in FO anywhere and so on.
@Hlavtox, thanks for your feedback.
Ping @PrestaShop/prestashop-product-team what do you think?
Can we add the missing order methods in the FO?
Thanks!
Hello @Hlavtox
The default order option selected in the BO corresponds to the "relevance" option in FO (selected by default when you opens a category in FO)
So, if you select for exemple "Product add date" in your BO, your products in categories in FO will be sorted this way when "relevance" is selected.
But your visitors can choose to sort products another way (by name or price)
Product date, brand, product quantity and product reference are not displayed in FO as it makes no sense for a visitor
@marionf Thats not true! Relevance is position inside of category. The sort you get when loading the page is the one from BO.
First image is when loading page (product quantity order) and the second one is relevance (product position order).
@marionf you sure that product add date and product brand doesn't make sense at all in FO ?
I mean, as an user, I could be interested about sorting products by brands or by added date in order to see recents products or even sorter by brands to search for a specific brand or juste sort it !
There is another problem on the "added date", we never show the added date on product pages, sorting by it would suppose that we show the date somewhere in FO, else it would be a bit blurry
@marionf Thats not true! Relevance is position inside of category. The sort you get when loading the page is the one from BO.
You're right, sorry I missed that
I could be interested about sorting products by brands or by added date in order to see recents products or even sorter by brands to search for a specific brand or juste sort it !
About the brand, this is possible to search by brand through faceted search module
There is another problem on the "added date", we never show the added date on product pages, sorting by it would suppose that we show the date somewhere in FO, else it would be a bit blurry
Unless if you call this option "News"
Anyway, I think there is a study to do on this topic !
@marionf @NeOMakinG
Another thing. @dgonzalez360 added a sorting by sales to faceted search https://github.com/PrestaShop/ps_facetedsearch/pull/172, but this order is missing from BO list of sort orders. What if an user wants to select it by default? He cannot. We need to unify it and make it configurable.
Ping @matks @eternoendless @marionf
What if we do it like this? Then we add a selectbox to choose the default one, with ASC/DESC setting.
@marionf @NeOMakinG
Another thing. @dgonzalez360 added a sorting by sales to faceted search PrestaShop/ps_facetedsearch#172, but this order is missing from BO list of sort orders. What if an user wants to select it by default? He cannot. We need to unify it and make it configurable.
Absolutely yes, this is a critical thread.
@dgonzalez360 How can We enforce the default sort by quantity sold, since there is no such item in Preferences -> Products?
Hi @futurowebpl,
I'm not sure about the best way to achieve it. Add a default selector for sorting on the ps_facetedsearch is easy but I think is a bit confusing for Prestashop users because you can select two different options (One inside Preferences -> Products and other inside Faceted Search Module).
The bigger issue here is that we can't unify the sorting order for product list controllers, each module can add their own sorting options and custom options are not available for all modules.
I think one of the ways to achieve this is to create new hooks (One for the productSortOrderSelection and one for the getProductsOrder inside Tools.php), then we can use the default Prestashop Sort Options plus all the options available inside modules.
With two hooks we can extend the sorting order options for all modules and make it available for all controllers unifying the layout.
What do you guys think? @marionf @NeOMakinG @Hlavtox
Unless there's an easier way
From what I looked, unfortunately it involves changing a lot of files from the core - hence maybe some simpler fix?
Default sorting after most purchased - I am sure that everyone will use this sort of sort, all others are very rarely used.
@khouloudbelguith the inability to force this sort by default is a waste of a very relevant functionality that has been missing for a long time,
Can anyone say whether it will be done or the developers should look for other ways?
Ping @PrestaShop/product-team friendly reminder :slightly_smiling_face:
Thanks!
@khouloudbelguith any news for this task?
Hey @futurowebpl
it's quite a complex topic and I'm not sure if we can deliver this before 1.7.7 release but let me assure you that it's something my customers and I are struggling with too, I'll look into this topic personally in the near future
@kpodemski have you looked at this topic? :)
Most helpful comment
Hey @futurowebpl
it's quite a complex topic and I'm not sure if we can deliver this before 1.7.7 release but let me assure you that it's something my customers and I are struggling with too, I'll look into this topic personally in the near future