Magento 2, Magento Development, Customization, Extension Development and Integration, Optimization, SEO and Responsive Design

Magento 2, Magento Development, Customization, Extension Development and Integration, Optimization, SEO and Responsive Design

How to get attribute Value and label by attribute ID without product in Magento

Get attribute Value and label by attribute ID without product in Magento

<?php $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', '136');?>
<?php foreach ( $attribute->getSource()->getAllOptions(true, true) as $option):?>
 <?php $attributeArray[$option['value']] = $option['label'];?>
 <?php echo "<pre>";?>
<?php $option['value'].'==>'.$option['label'];?>
 ?>
<?php endforeach;?>

136 is my Attribute id.




Please support us, Like us on Facebook.

  1. Also, you should always pay attention to charge the mobile using original chargers only.
    However, the memories that you make as you travel are usually much better remembered if you have a good travel companion by your side to share and
    document those memories with you. Some of the reasons behind this are the decline in prices of mobile
    phones, convenience of usage, and affordable mobile internet rates.


    Also visit my web blog ... multi vendor marketplace

    ReplyDelete

 

Copyright @ 2017 HKBlog.