Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Drop-down Attribut value on frontend
 
Andreas Burget
Jr. Member
 
Total Posts:  7
Joined:  2010-05-20
 

how do i get the current value of a drop down value from attributes?
If i am using <?php nl2br($this->htmlEscape($_product->getXXX())) ?> i only get a number.
thx and
regards andreas

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ryan Sun _Kuafu
Guru
 
Total Posts:  317
Joined:  2008-11-14
FL
 

the number is the value, I guess you mean current label, try

$product->getAttributeText('attribute_code');
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top