Exemplo n.º 1
0
 /**
  * Lock a specific category or product attribute so that it can not be editted through the interface.
  * @param Mage_Eav_Model_Entity_Attribute $attribute
  * @param Mage_Catalog_Model_Abstract     $model
  * @param                                 $profile
  */
 protected function _lockAttribute(Mage_Eav_Model_Entity_Attribute $attribute, Mage_Catalog_Model_Abstract $model, $profile)
 {
     $note = $attribute->getNote() ? $attribute->getNote() : '';
     if ($attribute->getAttributeCode() == 'ho_import_profile') {
         return;
     }
     if ($note) {
         $note .= "<br />\n";
     }
     $note .= Mage::helper('ho_import')->__("Locked by import: <i>%s</i>", $profile);
     $model->lockAttribute($attribute->getAttributeCode());
     $attribute->setNote($note);
 }