• Priority: 0
  • Status: Closed
  • Theme: Alysum
  • Assigned To: Fred
  • Private: No
  • Open Date: 18.03.21, 23:48
  • Opened by: zafon
  • Closed by: Fred
  • Closed on: 22.03.21, 16:10
  • Reason: Closed
  • Comment: Glad to help!

Ticket #21084 - Bad sorting in id_feature_value

Hey Fred,

There is a problem with sorting in functions (id_feature_value) in Alysum. The SQL query shows that it sorts according to the values ​​arranged, unfortunately in the theme it sorts alphabetically. A picture is attached.

Attachments:

id_feature_value.jpg (93.6 KiB)

Comments

zafon 18 Mar 2021, 23:51

Front view

Attachments:

f.jpg (15.1 KiB)
Fred 19 Mar 2021, 10:18

Hi, zafon.
That is a native prestashop module Faceted Search, we are not able to change it’s code. That is definitely not theme’s issue. The theme doesn’t manage features sorting but just display features as is.

zafon 19 Mar 2021, 12:53

Hey fred,

See how the native presty module works in the classic template (attachment). The Alysum sorts alphabetically. How do I make it sort by default?

Attachments:

presta_alysum.jpg (103.1 KiB)
presta_classic.jpg (178.4 KiB)
Fred 19 Mar 2021, 12:56

sorry, but I see nothing on the “classic” screenshot

zafon 19 Mar 2021, 12:59

Hi,

Do you have a problem opening photos or verifying the problem?

https://ibb.co/hYGqJ0K https://ibb.co/Qf2z4p6

Fred 19 Mar 2021, 13:01

I can see the images, but I don’t see the difference. There is different content at those two images

zafon 19 Mar 2021, 13:22

Hi,

Do you have a problem opening photos or verifying the problem?

https://ibb.co/hYGqJ0K https://ibb.co/Qf2z4p6

In my opinion, both photos show the ps_facetedsearch module - in the classic theme, it sorts by fixed positions. In Alysum, it sorts alphabetically, which in my case is not a good solution. Backend SQL queries show that it sorts according to the prestashop default settings. However, the frontend reads them differently

Fred 20 Mar 2021, 12:30

Write you once more, the theme doesn’t sort anything. It shows the filter as received from faceted search module

zafon 20 Mar 2021, 13:14

The theme sorts is ok, while the arrangement of the features is alphabetical, I would like them not to be alphabetical but by default according to their position.

See product feature items are positioned differently in the backend on the front shows alphabetical order

Attachments:

1.jpg (215.5 KiB)
2.jpg (189.6 KiB)
3.jpg (102.6 KiB)
zafon 20 Mar 2021, 13:20

Hey Fred, the same problem occurs in this topic:

https://www.sunnytoo.com/forums/topic/faceted-search-features-order

Fred 21 Mar 2021, 16:02

as I can see there they have modified core prestashop file /classes/controllers/ProductListingFrontController.php to change the order

zafon 21 Mar 2021, 18:30

Sorry Fred, it actually comes by default in the new facedsearch :(

Do you have an idea how to go about it?

zafon 21 Mar 2021, 22:36
Fred 22 Mar 2021, 11:48

as I write you above the sorting of options managed in the core file /classes/controllers/ProductListingFrontController.php
I have read about that by the link you gave me before