Magento: access a dropdown attribute value

In Magento it is possible to access a product’s attributes with a simple getter method. Let’s get the attribute test:

$_product->getTest()

This works as long as test is an attribute of type ‘text’. If the attribute is a dropdown, the method will just return the id of the selected option. To get the dropdown text, you need to call another method:

$_product->getAttributeText('test')

Magento design resources

As the documentation on Magento is a bit…spread around the web: here’s a collection of links to guides and hints how to deal with magento’s templating system (partially german). I will add more as I find them.

Screencasts