• Priority: 0
  • Status: Waiting on customer
  • Theme: Alysum
  • Assigned To: Fred
  • Private: No
  • Open Date: 10.03.25, 22:22
  • Opened by: francois andrieu

Ticket #25979 - also problem on search bar

on search bar , the products are not sorted by price , but in categories it is sorted by prices by default, and search bar don’t respect this actually

Comments

francois andrieu 17 Mar 2025, 12:08

please look the problem , on search bar on desktop , the sort by prices is not active and we can't change it
thanks to solve this also

Fred 17 Mar 2025, 21:58

As I can see the search result is using default sorting. Where do you have defined order by price for search?

francois andrieu 18 Mar 2025, 09:42

HELLO FRED , the sort is just made on the parameters of products for pagination of prestashop, sort by prices by the low to high prices

francois andrieu 18 Mar 2025, 11:09

and this work for all pages but not for the search bar and also for the page propotions (prices drop)

Fred 18 Mar 2025, 21:59

I just compared desktop and mobile search page and see no difference there, the order is the same https://mega.nz/file/dAJhBBRY#xa5NOoNBSNP_6aTKWxu7SLEGr-SDlkUmSzfYZ37PW-A

francois andrieu 19 Mar 2025, 09:29

and as you see the prices of the products are not ordered by prices (from low prices to high prices)

if you see in the categorie cameras of the products all is well ordered by prices
we have put in prestashop products ordered by prices (low prices to high prices)
but for search page and for the page promotions the products don't respect this order
we want that all must be ordered by prices low prices to high prices
like we have defined in the pagination of products of prestashop
in desktop and in amp mobile

francois andrieu 21 Mar 2025, 00:12

HELLO FRED DO YOU HAVE SEEN , IN THE PAGINATION OF PRESTASHOP PRODUCTS we have put a sorting by prices, l(low prices to high prices) all work good in all categories but when you search products by the search bar , products are not sorted by prices and same for the page promotions (prices drop) , products are not sorted by prices low to prices high
why ?

Fred 23 Mar 2025, 13:48

Please try now, it should be fixed

francois andrieu 23 Mar 2025, 16:59

hello Fred no, sorry, i have cleared the cache, and re-test , same problem the products are not sorted by prices automatically, for the search bar and also for the promotions page.

francois andrieu 23 Mar 2025, 17:03

but it is good on mobile for the search bar on amp , not for the promotions page .
But for desktop , for search bar no good to have the sort by prices, ans also for the page promotions

Fred 23 Mar 2025, 21:19

For the promotions page we have the same sorting like default prestashop page. If you want to change that -
- open the file

/web/modules/pkamp/src/Controller/AmpPLPController.php

- find following block

if ($this->name === PSPages::SPECIAL) {
  $sortOrder = new SortOrder('product', 'name', 'asc');
}

- change it to

if ($this->name === PSPages::SPECIAL) {
  $sortOrder = new SortOrder('product', 'price', 'asc');
}
francois andrieu 24 Mar 2025, 09:47

yes, this is good for mobile version now the page promotions is sorted by prices

but there is always the problem on the desktop version
for search bar and for promotions page on desktop version

Fred 24 Mar 2025, 21:22

In the desktop version, there’s no way to define a specific ordering for specific pages. The theme doesn’t manage product ordering at all.

francois andrieu 24 Mar 2025, 23:24

normally , the search page must respect the definition done in the products pagination of prestashop
and we have defined sorted by prices

Fred 25 Mar 2025, 22:24

I just installed Prestashop from scratch and configured products ordering by price, but search page still has it's own ordering → https://mega.nz/file/9dIhQJZb#fBgVPbNE01dzQaFsNhCrN9f1Mx9iNmIWtXtdtDlHQZY