/** * Collect validated attributes * * @param Mage_Catalog_Model_Resource_Product_Collection $productCollection * @return Mage_CatalogRule_Model_Rule_Condition_Product */ public function collectValidatedAttributes($productCollection) { $attribute = $this->getAttribute(); if ('category_ids' != $attribute) { if ($this->getAttributeObject()->isScopeGlobal()) { $attributes = $this->getRule()->getCollectedAttributes(); $attributes[$attribute] = true; $this->getRule()->setCollectedAttributes($attributes); $productCollection->addAttributeToSelect($attribute, 'left'); } else { $this->_entityAttributeValues = $productCollection->getAllAttributeValues($attribute); } } return $this; }