/** * Return attribute collection for current Product Attribute Set * * @return Mage_GoogleBase_Model_Mysql4_Attribute_Collection */ protected function _getAttributesCollection() { $registry = AO::registry(self::ATTRIBUTES_REGISTRY_KEY); $attributeSetId = $this->getProduct()->getAttributeSetId(); if (is_array($registry) && isset($registry[$attributeSetId])) { return $registry[$attributeSetId]; } $collection = AO::getResourceModel('googlebase/attribute_collection')->addAttributeSetFilter($attributeSetId, $this->getTargetCountry())->load(); $registry[$attributeSetId] = $collection; AO::unregister(self::ATTRIBUTES_REGISTRY_KEY); AO::register(self::ATTRIBUTES_REGISTRY_KEY, $registry); return $collection; }