cancel
Showing results for 
Search instead for 
Did you mean: 

Category Products - Sort By Newest

Category Products - Sort By Newest

Since upgrading to Magento 2.4x and having to use ElasticSearch as default, I am unable to find a way to sort category products by newest (created_at). I have tried enabling used_in_sort_by for created_at but it does not order products corretly. I am using the following to sort products -

                case 'new_arrivals':
                $this->_collection
                ->getSelect()
                ->order('e.entity_id '. $this->getCurrentDirection());
                break;

I can get price and name sorting to work fine but sort by created_at does not. I've also tried sort by entity_id which does not work also.

4 REPLIES 4

Re: Category Products - Sort By Newest

@christopher_oliver I'm also facing same issue after enable Elasticsearch newest product sorting not working. Also on search page price sorting stopped working. Have you found any solution? or anyone have suggestion for this issue? Thanks.

Re: Category Products - Sort By Newest

same problem with me, did you guys find any solution ?

Re: Category Products - Sort By Newest

Magento 2 offers 3 options of product listing: by position, product name, or price. To change the default sorting, go to Catalog > Categories, choose the needed category, and open the Display Setting tab. Then go to the Default Product Listing Sort By field and choose the needed parameter from the dropdown. Save the changes.

 

jcpenney login

Re: Category Products - Sort By Newest

The only working solution I found was Extra Sorting Options by Redchamps.