public function getAttributeReadonly($attribute) { if (is_object($attribute)) { $attribute = $attribute->getAttributeCode(); $attrId = $attribute->getAttributeId(); } else { $attribute_details = Mage::getSingleton("eav/config")->getAttribute('catalog_product', $attribute); $attribute_data = $attribute_details->getData(); $attrId = $attribute_data['attribute_id']; } $result = parent::getAttributeReadonly($attribute); $attributePermissionArray = Mage::helper('aitpermissions')->getAttributePermission(); if (isset($attributePermissionArray[$attrId])) { if ($attributePermissionArray[$attrId] == 0) { return true; } return false; } return $result; }
public function setValue($value) { parent::setValue($value); return $this; }