diff --git a/app/code/community/Sitewards/B2BProfessional/Model/Observer.php b/app/code/community/Sitewards/B2BProfessional/Model/Observer.php index 51e318d..b911384 100644 --- a/app/code/community/Sitewards/B2BProfessional/Model/Observer.php +++ b/app/code/community/Sitewards/B2BProfessional/Model/Observer.php @@ -251,9 +251,12 @@ protected function removePriceFilter($oBlock) { $aFilterableAttributes = $oBlock->getData('_filterable_attributes'); $aNewFilterableAttributes = array(); - foreach ($aFilterableAttributes as $oFilterableAttribute) { - if ($oFilterableAttribute->getAttributeCode() != 'price') { - $aNewFilterableAttributes[] = $oFilterableAttribute; + + if (is_array($aFilterableAttributes) || is_object($aFilterableAttributes)) { + foreach ($aFilterableAttributes as $oFilterableAttribute) { + if ($oFilterableAttribute->getAttributeCode() != 'price') { + $aNewFilterableAttributes[] = $oFilterableAttribute; + } } } $oBlock->setData('_filterable_attributes', $aNewFilterableAttributes); @@ -308,4 +311,4 @@ protected function getEventsProduct(Varien_Event_Observer $oObserver) { return $oObserver->getProduct(); } -} \ No newline at end of file +}