Magento: Get manufacturer name and id from product
Suppose, you have the product data.
You can get product from either of the following way:-
$_product = $this->getProduct();
OR,
$_product = Mage::getModel('catalog/product')->load(PRODUCT_ID);
Now, here is the code to get manufacturer name and id.
/**
* Get manufacturer name
*/
$manufacturerName = $_product->getAttributeText('manufacturer');
/**
* Get manufacturer id
*/
$manufacturerId = $_product->getManufacturer();
Related posts:
- Magento: Get parent id of simple product associated to configurable product
- Magento: How to get actual price and special price of a product?
- Magento: How to get product stock quantity & other stock information?
- Magento: Get list of all manufacturers
- Magento: How to get / filter all products by attribute value?
- Magento: How to get all associated children product of a configurable product?
- Magento: How to filter product collection using 2 or more category filters?
- Magento: Load store specific product
- Magento: Product Edit Warning: Invalid argument supplied for foreach()
- Magento: Get category name and url from product
