Magento – Get specific attribute for each product on catalog page

attributes

On catalog page, I want to display custom attribute near each product (e.g. shoes_model). When I try to fetch it:

$_product->getAttributeText('shoes_model'); // returns nothing

… it returns empty value. But when I try to get another attribute, e.g. brand, it returns correct value:

$_product->getAttributeText('brand'); // returns brand name

Can anyone explain why is this happening and how to include custom attribute in catalog products collection.

p.s. Option "Used in Product Listing" is set to Yes for both attributes, and I'm 100% sure that shoes_model is defined.

Best Answer

Everything was simpler than I thought, as shoes_model is text-based attribute, I should get it like so:

$_product->getShoesModel();

or like so:

$_product->getData('shoes_model');
Related Topic