Price Ranges in Magento

Price Ranges in Magento

July 2, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Price Ranges in Magento

Customizing Price Ranges in Magento Layered Navigation

The default price range filter provided by Magento’s layered navigation can sometimes feel limiting or not quite aligned with your store’s pricing strategy. By default, it divides prices into equal intervals of $100 (or your store’s currency equivalent). However, if you find that these ranges don’t accurately reflect your product offerings, read on to learn how to customize them.

Understanding the Default Behavior

The layered navigation calculates price ranges using the price_index/price_range index. When a customer applies filters or sorts by price, Magento looks up the corresponding price range based on this index.

By default, the price ranges are calculated as follows:

  • The first range is from 0 to the minimum price of your catalog.
  • Subsequent ranges are divided into intervals of $100 (or equivalent currency units).

Changing Price Ranges via Configuration

Before diving into code modifications, check if you can achieve your desired behavior using configuration options. In most cases, Magento allows you to adjust price range settings without touching the code.

To configure price ranges:

  1. Log in to your Magento admin panel.
  2. Navigate to Stores > Attributes > Price.
  3. Click on the name of the price attribute you want to modify (usually “Price”).
  4. Scroll down to the “Storefront Properties” section and locate the “Use Price Range Filter” field.

By default, this is set to Yes. If your catalog has a wide range of prices, you might want to consider changing this setting to No. This will remove price ranges from the layered navigation entirely, allowing customers to filter by specific price values instead.

Modifying Price Ranges via Code

If configuration options aren’t sufficient for your needs, you can modify the core code to adjust price range calculations. Please note that direct modifications to core files are generally discouraged in favor of creating custom modules or plugin extensions. However, for this example, we’ll demonstrate how to achieve the desired behavior by editing a core file.

  1. In your Magento installation’s app/code/core/Mage/Catalog/Model/Index/Price/Action/ directory, locate and open the index.php file.
  2. Search for the following line of code:
$range = $this->getMinMaxPrices();

This method calculates the minimum and maximum prices in the catalog.

  1. Just above this line, add the following snippet to adjust the price range interval:
$priceRangeStep = 50; // Change 50 to your desired interval value

$range['price_index']['price_range'] = array(
    'min_price' => $range['min_price'],
    'max_price' => $range['max_price'],
    'step'       => $priceRangeStep
);

In this example, we’re manually setting the price range step to $50. You can adjust this value based on your requirements.

  1. After adding this code, save and close the index.php file.
  2. Clear your Magento cache by navigating to System > Cache Management in the admin panel and clicking “Flush Magento Cache.”

Conclusion

Customizing price ranges in Magento’s layered navigation provides an opportunity to optimize the filtering experience for your customers. While configuration options offer some flexibility, direct core modifications allow you to tailor the behavior precisely to your store’s needs.

Remember that modifying core files should be done with extreme caution and ideally within a development environment. Always ensure you have a backup of your installation before making such changes.

If you’re looking to learn more about Magento development best practices or need assistance implementing custom functionality for your e-commerce store, feel free to reach out to the experts at Laravel Company. Our experienced team is ready to help you optimize your Magento store’s performance and user experience.

Happy coding!

Catalog Admin Configuration Customers

Our network