/** * Specify collection select filter by attribute value * * @param array|string|Mage_Eav_Model_Entity_Attribute $attribute * @param array|integer|string|null $condition * @return Mage_Sales_Model_Mysql4_Collection_Abstract */ public function addAttributeToFilter($attributes, $condition = null) { if (is_array($attributes)) { if (!empty($attributes)) { $this->_addAddressFields(); foreach ($attributes as $attribute) { parent::addAttributeToFilter($attribute['attribute'], $attribute); } } } else { return parent::addAttributeToFilter($attributes, $condition); } return $this; }
/** * Reset left join * * @return Mage_Eav_Model_Entity_Collection_Abstract */ protected function _getAllIdsSelect($limit = null, $offset = null) { $idsSelect = parent::_getAllIdsSelect($limit, $offset); $idsSelect->resetJoinLeft(); return $idsSelect; }