php - Magento getAttribute is not working in list.phtml? -


This is the magnetro code that I used to get the attribute.

  echo $ _product-> GetResource () - & gt; GetAttribute ('attrcode') - & gt; GetFrontend () - & gt; GetValue ($ _products);   

This code is working fine in view.phtml , this code returns the code attribute.

When I List.phtml return this code empty .

Please help me where I make a mistake.

  & lt; Php echo $ _product- & gt; GetAttributeText ('attrcode') ;? & Gt;   

Please use that page on the list page and check the attribute settings in 'Use in Product Listing': "Yes") < / Html>

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -