Skip to main content
Tweeted twitter.com/StackMagento/status/1158709431787577345
improved formating
Source Link
Qaisar Satti
  • 32.5k
  • 18
  • 87
  • 137

I am trying to get Min & Max priceMin & Max price in Layered NavigationLayered Navigation and I am using a third party extension for layered navigation..

By using below script, I am trying to get Min & Max price for filter collection.

  public function getPriceRange($filter){
     $Filterprice = array('min' => 0 , 'max'=>100);
    if($filter instanceof Magento\CatalogSearch\Model\Layer\Filter\Price) {
        $priceArr = $filter->getResource()->loadPrices(10000000000);           
        $Filterprice['min'] = reset($priceArr);
        $Filterprice['max'] = end($priceArr);
    }

    return $Filterprice;
}

But it says loadprice not a method. Can any please suggest to get Min & Max price.

I am trying to get Min & Max price in Layered Navigation and I am using a third party extension for layered navigation..

By using below script, I am trying to get Min & Max price for filter collection.

  public function getPriceRange($filter){
     $Filterprice = array('min' => 0 , 'max'=>100);
    if($filter instanceof Magento\CatalogSearch\Model\Layer\Filter\Price) {
        $priceArr = $filter->getResource()->loadPrices(10000000000);           
        $Filterprice['min'] = reset($priceArr);
        $Filterprice['max'] = end($priceArr);
    }

    return $Filterprice;
}

But it says loadprice not a method. Can any please suggest to get Min & Max price

I am trying to get Min & Max price in Layered Navigation and I am using a third party extension for layered navigation..

By using below script, I am trying to get Min & Max price for filter collection.

  public function getPriceRange($filter){
     $Filterprice = array('min' => 0 , 'max'=>100);
    if($filter instanceof Magento\CatalogSearch\Model\Layer\Filter\Price) {
        $priceArr = $filter->getResource()->loadPrices(10000000000);           
        $Filterprice['min'] = reset($priceArr);
        $Filterprice['max'] = end($priceArr);
    }

    return $Filterprice;
}

But it says loadprice not a method. Can any please suggest to get Min & Max price.

added 349 characters in body
Source Link
Ramesh
  • 986
  • 1
  • 14
  • 40

I am trying to get Min & Max price in Layered Navigation and I am using a third party extension for layered navigation..

By using below script, I am trying to get Min & Max price for filter collection.

  public function getPriceRange($filter){
     $Filterprice = array('min' => 0 , 'max'=>100);
    if($filter instanceof Magento\CatalogSearch\Model\Layer\Filter\Price) {
        $priceArr = $filter->getResource()->loadPrices(10000000000);           
        $Filterprice['min'] = reset($priceArr);
        $Filterprice['max'] = end($priceArr);
    }

    return $Filterprice;
}

But it says loadprice not a method. Can any please suggest to get Min & Max price

I am trying to get Min & Max price in Layered Navigation and I am using a third party extension for layered navigation..

By using below script, I am trying to get Min & Max price for filter collection.

$priceArr = $filter->getResource()->loadPrices(10000000000);

But it says loadprice not a method. Can any please suggest to get Min & Max price

I am trying to get Min & Max price in Layered Navigation and I am using a third party extension for layered navigation..

By using below script, I am trying to get Min & Max price for filter collection.

  public function getPriceRange($filter){
     $Filterprice = array('min' => 0 , 'max'=>100);
    if($filter instanceof Magento\CatalogSearch\Model\Layer\Filter\Price) {
        $priceArr = $filter->getResource()->loadPrices(10000000000);           
        $Filterprice['min'] = reset($priceArr);
        $Filterprice['max'] = end($priceArr);
    }

    return $Filterprice;
}

But it says loadprice not a method. Can any please suggest to get Min & Max price

Magento 2, get Min and Max price in Layered Navigation

I am trying to get Min & Max price in Layered Navigation and iI am using a third party extension for layered navigation..

By using below script, I am trying to get Min & Max price for filter collection.

$priceArr = $filter->getResource()->loadPrices(10000000000);

But it says loadprice not a method. Can any please suggest to get Min & Max price

Magento 2 get Min and Max price in Layered Navigation

I am trying to get Min & Max price in Layered Navigation and i am using third party extension for layered navigation..

By using below script am trying to get Min & Max price for filter collection.

$priceArr = $filter->getResource()->loadPrices(10000000000);

But it says loadprice not a method. Can any please suggest to get Min & Max price

Magento 2, get Min and Max price in Layered Navigation

I am trying to get Min & Max price in Layered Navigation and I am using a third party extension for layered navigation..

By using below script, I am trying to get Min & Max price for filter collection.

$priceArr = $filter->getResource()->loadPrices(10000000000);

But it says loadprice not a method. Can any please suggest to get Min & Max price

Source Link
Ramesh
  • 986
  • 1
  • 14
  • 40
Loading