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) -

c# - passing input text from view to contoller with FacebookContext using Facebook app -

Calling a C++ function from C# by passing a string with variable size to it -