Half way through writing a customised grouped product page for Magento, I realised that I’d never come across getting attribute labels before. I already had the attribute code loaded, so I just needed the script to load it by that attribute code. It turns out that product attribute labels is a bit of a tumbleweed subject in the online community so I dug it out of Mage/Eav/Model:
$product->getResource()->getAttribute('my_attribute_code')->getStoreLabel();It makes echoing out product attributes a much more dynamic affair. Thanks for reading the Magento Blog at Ecommerce Web Design.
Adam Moss Author Page
Không có nhận xét nào:
Đăng nhận xét