“Make the customer the hero of your story.” – Ann Handley
Every Magento 2 stores have a variety of products under different categories. Sometimes, it becomes tedious for customers to choose the product they exactly want. To boost sales and help the customer to find out specific items, one can sort category products in Magento 2.
Easy sorting allows visitors to check the products quickly with less scrolling. It enhances the onsite user experience.
Position, product name, and price are the default sorting options available in Magento 2.
Contradictory to adding sort by options, you may want to remove them. For example, you may want to remove sort by price option in Magento 2 for the below reasons:
- When quality matters the most, comparing to the price.
- When the store owner wants to highlight other unique factors than price.
- When you sell premium products like gold jewelry, diamonds, etc.
- When your sell service and allow users to call for price in Magento 2
- When you want to extend the price sorting by adding Magento 2 sort by price for low to high and high to low options to save some clicks for budget friendly buyers.
Here, I’m explaining the steps to remove sort by price option in Magento 2, follow it to remove price sorting option and target non-budget focused buyers.
Steps to Remove Sort by “Price” Option in Magento 2
<plugin name="Vendor_ModuleName::addCustomOptions" type="Vendor\Module\Plugin\Model\Config"/>
public function __construct(
$this->_storeManager = $storeManager;
public function afterGetAttributeUsedForSortByArray(\Magento\Catalog\Model\Config $catalogConfig, $options)
As easy as ABC, right?!
Feel free to ask your queries in the Comment section below and I would be happy to help.
Do consider sharing the post with Magento Community via social media.
Get Weekly Updates
Never miss Magento tips, tricks, tutorials, and news.
Thank you for subscribing.
Something went wrong.