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.