How to Add Sort by “Newest Product” option in Magento 2

How to Add Sort by "Newest Product" option in Magento 2

It’s never ‘job done’ when it comes to providing exceptional customer experiences. It is necessary to offer out-of-the-box functionalities to customers for their convenience.

Bringing products with certain criteria to the top of the page can be particularly useful for customers who aren’t exactly sure what they want.

Default Magento 2 provides three options for product sorting on category page.

  • Product
  • Position
  • Name

How to Add Sort by "Newest Product" option in Magento 2 1


To increase and maintain user efficiency, default sorting options are not enough. We have to make a remarkable effort to present more sorting facilities for customers. You can refer Magento 2 Improved Sorting extension to sort products by options such as best sellers, ratings, top-rated, most reviewed, etc.

Mostly customers are curious by nature and always affectionate towards browsing the latest products. Today, I’ve come up with the solution to add sort by newest product option in Magento 2.

Steps to Add Sort by Newest Product Option in Magento 2


1 . Create di.xml file in Vendor/Module/etc

2 . Create Config.php file in Vendor/Modulename/Plugin/Model

3 . Create Toolbar.php file in Vendor/ModuleName/Plugin/Product/ProductList

Following the above steps, you can see the sort by newest product option in Magento 2 category page as shown below:

add sort by newest product option in Magento 2

That’s all!
Do you have any doubt? Mention it in the comment section below. I’ll glad to help you.
Also, let me know if you found any positive impact on purchase of new products after implementing the solution.
Please do consider sharing this post with Magento Community via social media.
Thank You.


Get Weekly Updates

Never miss Magento tips, tricks, tutorials, and news.

Thank you for subscribing.

Something went wrong.

(based on 10 Reviews)

Milan is a Magento Developer at Meetanshi. Apart from work, he plays cricket passionately. He loves reading books in his free time.

Leave a reply:

Your email address will not be published.