Skip to content

Offer the Date added (Newest) sort on every product list#1269

Open
boo-code wants to merge 1 commit into
PrestaShop:devfrom
boo-code:feat/newest-sort-on-all-lists
Open

Offer the Date added (Newest) sort on every product list#1269
boo-code wants to merge 1 commit into
PrestaShop:devfrom
boo-code:feat/newest-sort-on-all-lists

Conversation

@boo-code

@boo-code boo-code commented Jul 7, 2026

Copy link
Copy Markdown
Contributor
Questions Answers
Description? SearchProvider::getAvailableSortOrders() builds the date_add ("Date added" / newest) sort orders but only appends them when $query->getQueryType() == 'new-products', so category, manufacturer, supplier and search lists never offer a "newest" sort. Sorting by newest is one of the core product-list sorts in UX research (https://baymard.com/blog/current-state-product-list-and-filtering, "64% don't allow all 4: Price, User Rating, Best-Selling, Newest"). This moves the two date_add sort orders out of the new-products special case so they are available on every product list; Sales stays the default sort, so only the option is added, and the new-products page is unchanged. Fixes #1268.
Type? improvement
BC breaks? no
Deprecations? no
Fixed ticket? Fixes #1268
Sponsor company
How to test? Open any category page: the sort dropdown now lists "Date added, oldest to newest" and "Date added, newest to oldest" alongside the existing options, and selecting the latter sorts by product.date_add.desc. Verified live on a 9.2 shop. php-cs-fixer clean; the change only relocates existing lines (no new symbols), and this module runs php-cs-fixer + PHPStan in CI (no PHPUnit job) — getAvailableSortOrders() is a private method not covered by the existing SearchProvider tests, which are unaffected.

@github-project-automation github-project-automation Bot moved this to Ready for review in PR Dashboard Jul 7, 2026
@ps-jarvis ps-jarvis added the Waiting for QA Status: Action required, Waiting for test feedback label Jul 7, 2026
@kpodemski kpodemski added this to the 5.1.0 milestone Jul 7, 2026
@ps-jarvis ps-jarvis moved this from Ready for review to To be tested in PR Dashboard Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Waiting for QA Status: Action required, Waiting for test feedback

Projects

Status: To be tested

Development

Successfully merging this pull request may close these issues.

Date added (Newest) sort is only offered on the new-products page, not on category/search lists

3 participants