How to change the Price Range Magento

If you need to change the Price Range in your Magento catalog go to:

app/code/core/Mage/Catalog/Model/Layer/Filter/Price.php

Look for the line:

Change the 10 for a lower / higher number.

Please notice you’re editing a Magento Core file.

You will lose the changes if you ever upgrade. You should create the same folder structure and override the file but within the /app/local folder (is there an other way?).

From the Admin

You can also edit the price range from the Admin:

1. Go to System > Configuration > Catalog (under Catalog) > Layered Navigation

2. Change the Price Navigation Step Calculation dropdown from Automatic to Manual

3. Enter the amount you want it to be (e.g. – 50) into the Default Price Navigation Step input box

4. Save

16 comments
  • I want price ranges like this:
    • Dresses under $100
    • Between $100-$200
    • Between $200-$300
    • Between $300-$400
    • Between $400-$500
    • Dresses Over $500

    If you have any solution please send me answer on my mail also

  • Backend->Menu->Catalog->Manage Categories

    Select Your category Dresses on left pane

    Select TAB, Display settings.

    Layered Navigation Price Step

    Uncheck Use Config Settings

    Set the step You want.

  • I want to change the price range like this

    Under $2,000
    $2,000 – $10,000
    $10,000 – $30,000
    Over $30,000

    any suggestion

  • hello
    same issue here too (as Shuja and eduardo)
    did anyone found a solution?
    thx

    • Hi aurelien,

      Have you tried the following?

      1. Go to Admin > System > Configuration > Catalog (under Catalog) > Layered Navigation.

      2. Change the Price Navigation Step Calculation dropdown from Automatic to Manual.

      3. Enter the amount you want it to be (e.g. – 50) into the Default Price Navigation Step input box .

      4. Save

      Cheers,

      Rick

    • hello
      yes, I already saw this option
      but it generates a fix-value ranges (0-50, 50-100, 100-150, …)
      as Shuja mentionned, my need is to have custom price ranges (0-100, 100-500, 500-2000, …)

    • I’ve found this thread, there’s a lot of code in there. Give it a shot:

      http://www.magentocommerce.com/boards/viewthread/10213

      If you find an easy solution, feel free to come back and post it for the rest 😉

      Good luck!

  • Hi,

    I solve it coping Price.php to Local->Mage->Catalog->Model->Layer->Filter->Price.php

    then I added an if to the products biger than 10000000 (my products with out prise have a big numbers )

    [code]

    /**
    * Get data for build price filter items
    *
    * @return array
    */
    protected function _getItemsData() {
    if (Mage::app()->getStore()->getConfig(self::XML_PATH_RANGE_CALCULATION) == self::RANGE_CALCULATION_IMPROVED) {
    return $this->_getCalculatedItemsData();
    } elseif ($this->getInterval()) {
    return array();
    }

    $range = $this->getPriceRange();
    $dbRanges = $this->getRangeItemCounts($range);
    $data = array();

    if (!empty($dbRanges)) {
    $lastIndex = array_keys($dbRanges);
    $lastIndex = $lastIndex[count($lastIndex) – 1];

    foreach ($dbRanges as $index => $count) {
    $fromPrice = ($index == 1) ? ” : (($index – 1) * $range);
    $toPrice = ($index == $lastIndex) ? ” : ($index * $range);

    //EGS if toPrice is more than 20 the 20
    if ($fromPrice >= 1000000.1) {
    $data[] = array(
    ‘label’ => ‘Enquire’,
    ‘value’ => $fromPrice . ‘-‘ . $toPrice,
    ‘count’ => $count,
    );
    } else {
    $data[] = array(
    ‘label’ => $this->_renderRangeLabel($fromPrice, $toPrice),
    ‘value’ => $fromPrice . ‘-‘ . $toPrice,
    ‘count’ => $count,
    );
    }
    }
    }

    return $data;
    }

    [/code]

    Hope this help someone,

    saludos

    • Awesome, thanks for sharing.

      One thing, though… Where are the price ranges?

      It looks like it gets them from the DataBase, right?

      [code]
      $range = $this->getPriceRange();
      [/code]

  • Hi,

    the code i added it is just to group the products that are more than a fix value thats all.

    The ranges come from the admin. Magento (at least 1.7) gives you the posibility to add fix ranges or avarages ragens or even category ranges from the admin.

    My problem was that what my customer wanted was not to show prices of more than 20000.

  • hello
    I made my own solution months ago, just after posting here
    just posted it on GitHub: https://github.com/DiaFR/MagentoCustomizePriceFilter

Leave a Reply

Add <code> Some Code </code> by using this tags.

*
*