I want to display manufacturer name in product/view.phtml .I have all used all sort of functions like
<?php echo $_product->getAttributeText('manufacturer');?>
<?php echo $this->htmlEscape($_product->getData('manufacturer'));
<?php echo $_product->getData('manufacturer'); ?>
But none of them helped.So how to get manufacturer name in product view page .
As mentioned above you will need to follow a few steps:
1) goto Attribute Sets, and make sure "manufacturer" is assigned to the attribute set you are using.
2) Make sure you have added some manufacturers into the attribute options.
3) Assign one of the options to your product.
Depending on your magento version this should work:
<?php echo $_product->getAttributeText('manufacturer') ?>
I can see the error you are getting:
gives error Call to a member function getManufacturer() on a non-object in
Are you sure you are putting this code after this line:
<?php $_product = $this->getProduct(); ?>
you can use something like this to get manufacture name
$_product->getResource()->getAttribute('manufacture')->getFrontend()->getValue($_product);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With