Skip to content

Magento : Munculkeun Daftar Nilai Attribute ti Spesifik Attribute

jaga2 bisi poho..soalna sering dipake,….ieu carana keur munculkeun attribute value, mangga ah..haha


$name=’size’;  /*kode attribute na di dieu*/
$attributeInfo = Mage::getResourceModel(‘eav/entity_attribute_collection’)->setCodeFilter($name)->getFirstItem();
$attributeId = $attributeInfo->getAttributeId();
$attribute = Mage::getModel(‘catalog/resource_eav_attribute’)->load($attributeId);
$attributeOptions = $attribute ->getSource()->getAllOptions(false);
foreach($attributeOptions as $attr)
echo $attr[‘value’].’|’.$attr[‘label’].'<br>’; /* di dieu keur nampilkeun attribute na*/


Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *