cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving Product Attributes

Retrieving Product Attributes

Hi

I am running Magento 1.9.3.7. I want to display the manufacturer attribute for each product on my category grid list. I have modified list.phtml with the following :-

 

php echo $_product->getAttributeText('manufacturer');

 

This retrieves the product attribute 'manufaturer' correctly BUT when it is displayed on the category list page, the text has no spaces. I have checked and there are spaces for the attribute. So I get for example Aquamarina displayed instead of Aqua Marina.

 

I don't know why. Please can you help

 

2 REPLIES 2

Re: Retrieving Product Attributes

Hi @philevans114,

 

Can you share how are you getting the attribute into your phtml? Maybe there is an error because you need to get the Attribute Option Text.

Re: Retrieving Product Attributes

Hi,

 

Can you try to use <?php echo $this->escapeHtml($_product->getAttributeText('manufacturer')) ?> instead.

 

Let me know if it works.

 

Regards
Sunil