In the following code att_code is the code value of your attribute that you give for your custom attribute.
<?php /** * For attribute collection */ $attribute = $_product->getResource()->getAttribute('att_code'); /** * For attribute type */ $attribute->getAttributeType(); /** * For attribute Label */ $attribute->getFrontendLabel(); /** * For attribute default value */ $attribute->getDefaultValue(); /** * check if the attribute is visible */ $attribute->getIsVisible(); /** * check if the attribute is required */ $attribute->getIsRequired(); /** * For attribute value */ $attributeValue = Mage::getModel('catalog/product')->load($_product->getId())->getMyAttribute(); ?>
0 Comments