I am trying to retrieve the text value for the manufacturer attribute. It is a dropdown field. I tried this:
$manufacturerName = $_product->getAttributeText('manufacturer');
$manufacturerId = $_product->getManufacturer();
$manufacturerName
should display “BrandName“, but it always displays 1 even if I change the manufacturer. The $manufacturerId
changes when I change the manufacturer.
I don’t understand why the manufacturer name is not displayed correctly. Any ideas?
2
Answers
I think you can check on this code:
https://magento.stackexchange.com/questions/62220/getattributetext-use-default-value-regardless-what-store-view-the-user-is-on
Worked for me.