单击 magento 1.9 中的价格过滤器第一个范围后出现错误结果

wrong result after click on price filter first range in magento 1.9

我尝试编辑 magento 1.9 的价格过滤器。当点击过滤器的第一个范围时,它给我错误的结果 bcz 它的最小值为 0.00 我想将这个 0.00 更改为 1 。

您可以通过以下方式更改价格过滤器值:

<?php 
$getLabel = $_item->getLabel();
if (strpos($getLabel, 'price')!== false) :?>
    <a class="multi-select unselected" href="<?php echo $this->urlEscape($_item->getUrl()) ?>">

        <?php 
        $getValue = $_item->getValue();
            $fitlerPrices = str_replace('-', ' - ', $getValue);


            $file = basename($fitlerPrices); 

            $parts = explode("-", $file); 
            $getCurency = Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol();
            $priceBefore = $getCurency . number_format($parts[0], 0);
            $priceAfter = $getCurency . number_format($parts[1], 0); ?>
            <?php
                if($i == $count){
                    //item terakhir  
                    echo '<span class="price">' . $priceBefore . 'and Above</span>';
                }elseif($i <= 1){
                    //item pertama  
                    echo '<span class="price">Below ' . $priceAfter . '</span>';
                }else{
                     echo '<span class="price">' . $priceBefore . ' - ' .$priceAfter . '</span>';
                }
            ?>

        </a>
<?php else :?>

    <a class="multi-select unselected" href="<?php echo $this->urlEscape($_item->getUrl()) ?>"><?php echo $_item->getLabel(); ?></a>
<?php endif?>

为此,

  1. 您必须保持产品的最低价格为 1 卢比。
  2. 首先,检查您的管理面板中是否有任何产品的价格为 0。如果有,修改。那么你一定会得到解决方案。