Magento 2 Sort by Price: Use Low to High and High to Low Options
[Updated: March 12, 2026]
Customers abandon stores that make finding products difficult. Price sorting reduces friction and drives conversions by letting shoppers filter results the way they want.
This guide covers admin configuration, custom module development, extension comparison, and fixes for common sorting problems in Magento 2.4.8.
Key Takeaways
- Magento 2 includes built-in price sorting through the admin panel with position, name, and price options
- Custom "Price Low to High" and "Price High to Low" labels require a plugin module with two PHP files
- Configurable products have known sorting bugs when special prices or catalog price rules apply
- Third-party extensions add 14+ sorting criteria starting at $89.99
- Reindexing after any sorting change is required for the frontend to reflect updates
What Is Sort by Price in Magento 2?
Sort by price = a catalog feature that lets customers reorder product listings from lowest to highest price (or reverse). Built into Magento's core, but limited to a single "Price" option without custom development.
Perfect for: E-commerce stores with price-sensitive shoppers, stores running promotions, catalogs with wide price ranges
Not ideal for: Stores selling a single product or fixed-price services
Magento 2 ships with three default sorting options: Position, Product Name, and Price. The price option sorts products in ascending order. To add separate "Low to High" and "High to Low" labels, you need either a custom module or a third-party extension.
Price sorting relies on the catalog_product_index_price table. This index must be current for sorting to work. Stale indexes produce incorrect sort order on category and search result pages.
How to Configure Sort by Price in the Admin Panel
Method 1: Set Price as Default Sort Order
- Navigate to Stores > Configuration > Catalog > Catalog
- Expand the Storefront section
- Set Product Listing Sort by to Price
- Set Allow All Products to be Sorted to Yes
- Click Save Config
- Flush the cache for changes to take effect
Method 2: Set Sort Order Per Category
- Navigate to Catalog > Categories
- Select the target category
- Open the Display Settings tab
- In Default Product Listing Sort By, uncheck "Use Config Settings" and select Price
- Save the category

This setting overrides the global configuration for that specific category.
Method 3: Manual Product Positioning (Adobe Commerce)
For Adobe Commerce (Enterprise) users with the Visual Merchandiser:
- Navigate to Catalog > Categories
- Select a category and expand Products in Category
- Click the tiles icon to switch to grid view
- Drag and drop products into your preferred order

You can also set automatic sorting rules based on attributes like price, stock status, or creation date.
How to Add Custom Low to High and High to Low Options
The default "Price" sort option does not offer separate ascending and descending labels. This custom module adds two distinct options: "Price: Low to High" and "Price: High to Low."
Step 1: Register the Module
Create app/code/Vendor/SortByPrice/registration.php:
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Vendor_SortByPrice',
__DIR__
);
Step 2: Define the Module
Create app/code/Vendor/SortByPrice/etc/module.xml:
<?xml version="1.0"?>
<config xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Vendor_SortByPrice"/>
</config>
Step 3: Configure the Plugins
Create app/code/Vendor/SortByPrice/etc/di.xml:
<?xml version="1.0"?>
<config xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Catalog\Block\Product\ProductList\Toolbar">
<plugin name="sort_by_price_toolbar" type="Vendor\SortByPrice\Plugin\Catalog\Block\Toolbar"/>
</type>
<type name="Magento\Catalog\Model\Config">
<plugin name="sort_by_price_config" type="Vendor\SortByPrice\Plugin\Catalog\Model\Config"/>
</type>
</config>
Step 4: Create the Toolbar Plugin
Create app/code/Vendor/SortByPrice/Plugin/Catalog/Block/Toolbar.php:
<?php
namespace Vendor\SortByPrice\Plugin\Catalog\Block;
use Magento\Catalog\Block\Product\ProductList\Toolbar as ProductToolbar;
class Toolbar
{
public function aroundSetCollection(
ProductToolbar $subject,
\Closure $proceed,
$collection
) {
$currentOrder = $subject->getCurrentOrder();
$result = $proceed($collection);
if ($currentOrder === 'high_to_low') {
$subject->getCollection()->setOrder('price', 'desc');
} elseif ($currentOrder === 'low_to_high') {
$subject->getCollection()->setOrder('price', 'asc');
}
return $result;
}
}
Step 5: Add the Sort Options
Create app/code/Vendor/SortByPrice/Plugin/Catalog/Model/Config.php:
<?php
namespace Vendor\SortByPrice\Plugin\Catalog\Model;
use Magento\Catalog\Model\Config as CatalogConfig;
class Config
{
public function afterGetAttributeUsedForSortByArray(
CatalogConfig $catalogConfig,
$results
) {
$results['low_to_high'] = __('Price: Low to High');
$results['high_to_low'] = __('Price: High to Low');
return $results;
}
}
After creating all files, run:
bin/magento module:enable Vendor_SortByPrice
bin/magento setup:upgrade
bin/magento cache:flush
The new options appear in the sort dropdown on product listing pages.
Sort by Price for Configurable Products
Configurable product sorting is one of the most reported issues in Magento 2. Multiple GitHub issues document unexpected behavior when sorting mixed product types by price.
The Problem
When configurable and simple products exist in the same category, price sorting can produce incorrect results. This happens because:
- Configurable product prices in the index reference child product data
- Special prices and catalog price rules create mismatches between indexed and displayed prices
- The
catalog_product_index_pricetable stores minimum prices for configurable products based on their children
Known Issues
| Issue | Magento Versions | Status |
|---|---|---|
| Sort by price uses discounted price for configurable but regular price for simple products | 2.4.5+ | Closed (S2) |
| Sorting affected by child product data when sort direction changes | 2.4.6+ | Reported |
| Sort by price requires forced reindex after price changes | All 2.4.x | Workaround available |
| Min/Max price set to 0 when child products have no stock | 2.4.x | Open (workaround: reindex + stock fix) |
| "As low as" label missing on single-option configurables | 2.4.7+ | GitHub #40104 (2025) |
| Thousand separator missing in certain locales (sl_SI, it_IT) during configurable price updates | 2.4.6-2.4.7 | GitHub #40357 (fixed in later patches) |
Workarounds
-
Reindex after every price change: Run
bin/magento indexer:reindex catalog_product_priceafter updating prices, special prices, or catalog price rules - Use "Update on Schedule" indexer mode: Set the price indexer to run on cron for automatic updates
- Avoid mixing product types in price-sorted categories: Keep configurable products in separate categories when price sorting accuracy is critical
- Use a sorting extension: Extensions like Amasty Improved Sorting handle configurable product pricing with more reliable results than core
- For stores with many special prices or customer group rules: Amasty Improved Sorting and Mirasvit Improved Sorting handle customer-group-specific pricing rules better than core sorting. Both extensions maintain separate price indexes that account for tier prices and catalog rules per customer group.
Best Sorting Extensions for Magento 2
For stores that need more than the default three sorting options, these extensions add advanced capabilities.
1. Amasty Improved Sorting

Amasty Improved Sorting adds 14 sorting options including bestsellers, most viewed, top rated, and new arrivals.
Features:
- Compatible with Hyva theme 1.4 and Live Search
- Featured product blocks on any page
- Move out of stock products to end of listings
- Drag and drop sort option reordering
- GraphQL support for headless storefronts
- Usage analytics for sorting options (new in v2.16.0)
Pricing: $209 (Community), $499 (Enterprise), $799 (Cloud)
Latest release: v2.16.0 (March 2026) added usage analytics for sorting options and full Hyva 1.4 support.
2. WeltPixel Advanced Category Sorting
![]()
WeltPixel Category Sorting provides seven sorting options: sort by position, product name, price, newest arrivals, best selling, top rated, and most reviewed.
Features:
- Add, rename, and reorder sorting options
- Compatible with multi-store setups
- Ajax sorting with layered navigation
Pricing: Open source since January 2026 (v1.16.0). Available free on GitHub. User reports confirm compatibility with Hyva 1.3+, though not certified by WeltPixel.
3. FMEExtensions Improved Sorting

FMEExtensions Improved Sorting offers 14 sorting parameters with cron job scheduling and out of stock product management.
Features:
- Default sorting option configuration
- Scheduled cron jobs for sort data updates
- Featured product widgets
- Approved on the Adobe Commerce Marketplace
Pricing: $89.99 (all editions)
Extension Comparison
| Feature | Amasty | WeltPixel | FMEExtensions |
|---|---|---|---|
| Sorting options | 14 | 7 | 14 |
| Hyva compatible | Yes (1.4 certified) | Reported working (1.3+, not certified) | Not certified (often functional) |
| Live Search support | Yes | No | No |
| Price (Community) | $209 | Free (open source) | $89.99 |
| GraphQL support | Yes | No | No |
| Latest update | v2.16.0 (Mar 2026) | v1.16.0 (Jan 2026) | 2025 |
Troubleshooting Common Sort by Price Issues
| Issue | Cause | Fix |
|---|---|---|
| Products not sorting in correct order | Stale price index | Run bin/magento indexer:reindex catalog_product_price |
| Sort by price option missing | Price attribute not set as sortable | Stores > Attributes > Product > Price > set "Used for Sorting" to Yes |
| Configurable products in wrong position | Index uses child product data | Reindex, or use an extension for reliable configurable sorting |
| Sorting inconsistent across store views | Per-store config conflicts | Verify Default Product Listing Sort By matches in all store views |
| Custom sort options not appearing | Module not enabled or cache stale | Run bin/magento module:status and bin/magento cache:flush |
| Sort order resets after page navigation | Theme or extension JavaScript conflict | Check browser console for JS errors, disable third-party modules to isolate |
Proper server performance affects how fast sorting operates on large catalogs. Stores with 10,000+ products benefit from managed Magento hosting with optimized MySQL configuration and dedicated resources for indexing operations.
FAQ
1. Does Magento 2 support sort by price out of the box?
Yes. Magento 2 includes price as one of three default sorting options (Position, Product Name, Price). It sorts in ascending order. For separate "Low to High" and "High to Low" labels, you need a custom module or extension.
2. Why is sort by price not working after I changed product prices?
The price index is stale. Run bin/magento indexer:reindex catalog_product_price and flush the cache with bin/magento cache:flush. Set your indexer to "Update on Schedule" mode to prevent this.
3. How do I set price as the default sort order for all categories?
Navigate to Stores > Configuration > Catalog > Catalog > Storefront. Set Product Listing Sort by to Price. This applies to all categories unless overridden at the category level.
4. Can I sort configurable products by their lowest child price?
Magento indexes the minimum price of configurable product children. Sorting uses this minimum price. When special prices or catalog rules apply, the indexed price may not match the displayed price. Reindexing after price changes resolves most discrepancies.
5. Is it possible to sort by newest products in Magento 2?
Yes. Edit the "New From Date" attribute in Stores > Attributes > Product. Set "Used for Sorting in Product Listing" to Yes. Products with a "New From Date" value appear in the sort dropdown.
6. How do I remove the price sort option from my store?
Navigate to Stores > Attributes > Product > Price. Set "Used for Sorting in Product Listing" to No. Save and flush the cache.
7. Do sorting extensions work with Hyva themes?
Amasty Improved Sorting supports Hyva 1.4 (certified since v2.16.0, March 2026). WeltPixel went open source in January 2026 and user reports confirm compatibility with Hyva 1.3+, though WeltPixel has not certified it. FMEExtensions does not list Hyva support but users report it works in many setups. Verify compatibility with your specific Hyva version before purchasing.
8. How does sort by price interact with layered navigation filters?
Price sorting applies after layered navigation filters. When a customer selects a price range filter, sorting reorders products within that filtered set. Both features rely on the price index. Keep the index current for consistent behavior.
9. What happens to out of stock products when sorting by price?
By default, Magento displays out of stock products at the bottom of sorted results. You can hide them in Stores > Configuration > Catalog > Inventory > Stock Options by setting "Display Out of Stock Products" to No.
10. Can I create custom sorting options without writing code?
Third-party extensions like Amasty Improved Sorting and FMEExtensions provide 14+ sorting options through admin configuration. No code required. WeltPixel offers a free open source alternative with seven options.
Summary
Magento 2 sort by price is a core catalog feature that drives conversions for price-conscious shoppers. The built-in options handle basic needs. Custom modules add clear "Low to High" and "High to Low" labels. Third-party extensions provide 14+ sorting criteria for stores that need advanced product merchandising.
Configurable product sorting remains a known limitation. Reindex after price changes and test sort results on your frontend before going live.
For stores running large catalogs with frequent price updates, reliable Magento hosting ensures fast indexing and smooth sorting performance.
