Magento is able to display price ranges in the layered navigation. It offers 3 ways to calculate price step. But none of them allows to specify exactly the price ranges you want to see.
Another point is that Magento subtracts 0.01 to the highest value of each price range when displaying them. I.e. if range is "100-200", Magento will display "100.00 - 199.99".
This extension allows you to set the exact price ranges you need and to disable subtraction of 0.01.
Tested on Magento CE 1.6 - 1.9
Michele Marcucci forked v1.0 of this module to make a compatibility fix for Magento CE 1.5. Current version of this module should be already compatible (not tested).
- Free and open source
- Fully configurable
- Bundled with English and French translations
No Magento files will be modified but following classes will be extended and some of their methods overridden:
- Mage_Catalog_Model_Layer_Filter_Price
- Mage_Catalog_Model_Resource_Layer_Filter_Price
- Download the latest version of this module here
- Unzip it
- Move the "app" folder into the root directory of your Magento application, it will be merged with the existing "app" folder
$ modman clone git@github.com:aurmil/magento-customize-price-filter.git
- Adapt the following "composer.json" file into yours:
{
"require": {
"aurmil/magento-customize-price-filter": "dev-master"
},
"repositories": [
{
"type": "composer",
"url": "http://packages.firegento.com"
},
{
"type": "vcs",
"url": "git://github.com/aurmil/magento-customize-price-filter"
}
],
"extra": {
"magento-root-dir": "./"
}
}
- Install or update your composer project dependencies
In System > Configuration > Catalog > Catalog > Layered Navigation, this extension adds two new options: Price Ranges and Subtract 0.01 from the highest value of each price range
This option is only available if you choose Manual for Price Navigation Step Calculation.
Note about the screenshot: you can see a semicolon at the end of the field. This is just because the value continues on the right, this is not the last character.
You have to stick to this format:
- ; separates prices ranges
-
- separates min and max values of a given range
- min value of the first range and max value of the last range are optional. Magento will respectively display "Under [max1]" and "[minN] and above".
Leaving this field empty means stay with the Magento basic behavior for manual calculation.
This option is available regardless of the value set for Price Navigation Step Calculation.
- Select "Yes" (default value) to stay with the Magento basic behavior
- Select "No" to disable subtraction of 0.01
In Catalog > Manage Categories, this extension adds a new category attribute: Price Ranges in the Display Settings tab panel.
This attribute allows you to override the price ranges configuration option for each catalog category. It will be considered when browsing the corresponding category frontend page.
Leaving this field empty means using the price ranges configuration option.
- Add possibility to set price ranges per catalog category
- Fix for product count, with "Maximum Number of Price Intervals"
- Magento CE 1.8 and 1.9 compatibility checked
- Various minor changes and fixes
- Magento CE 1.6 compatibility
- some minor corrections
- initial release