I'm looking for a snippet to display attribute value id of a product on a products list page, I already use this piece of code to display attributes values but I need to get their ID number:
$attributeValue = Mage::getModel('catalog/product')->load($_product->getId())->getAttributeText('icontags');
Example:
Attribute: Color
Value: red
Value Id: 580
I'm guessing you are referring to the option_id, which can simply be got with getData
$attributeValue = Mage::getModel('catalog/product')->load($_product->getId())->getData('icontags');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With