I've found topics about enabling sorting by date, this being one example but on 2.4 this does not work, even manually typing ?product_list_order=created_at
in url does not get any results, is there some change implemented in 2.4 which has an issue with this, tried to debug collection load for products but not much luck.
-
Did you try the db approach? magento.stackexchange.com/a/287793/70343– Dominic PixieAug 12, 2020 at 18:15
-
Yes, posted link in my post refers to that approach, also tried the different solution with extending toolbar and adding sorting by created at there, same result– James AmbardnishviliAug 12, 2020 at 18:22
1 Answer
Run these SQL queries:
update eav_attribute set frontend_label = 'Date' where attribute_id=112;
update catalog_eav_attribute set used_for_sort_by = 1 where attribute_id=112;
This will set set created_at as sortable and add default label "Date". Reindex catalog search index and it will start working.