Magento Forum

Get the value of an attribute in the product list
 
wibbel
Member
 
Total Posts:  63
Joined:  2009-06-17
 

Hi,

Please bare with me as I’m VERY new to this ....

I’ve created a product attribute called ‘faulty’ with a value of yes or no. I’ve allowed it to be displayed on the product details and it works fine displaying under the ‘additional attributes’ section.

However, I’d like to test the value of this attribute in the product list generated by catalog/product/list.phtml so that in the grid display of products, each product that is ‘faulty’ can be displayed slightly differently.

Having spend hours scanning the forums, trying to find the value of the attribute using things like $attribute=$_product->getFaulty() and
$attribute=$_product->getAttributeText(’faulty’) and all various permutations, I’m getting nowhere. I’ve even tried using the attribute.phtml code that displays it on the product detail but having no luck at all.

I’d really appreciate it if someone could push me in the right direction. Its so frustrating that it displays on the main details and I can’t even make it work one screen back!!

Thanks in advance Andrew

 
Magento Community Magento Community
Magento Community
Magento Community
 
wibbel
Member
 
Total Posts:  63
Joined:  2009-06-17
 

... Scatch that ... just found another thread that may contain the answer… always the same ... can’t find it till you post!

http://www.magentocommerce.com/boards/viewthread/6401/

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top