Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento Product Attribute Get Value

How to get specific product attribute value if i know product ID without loading whole product?

like image 979
Denis Óbukhov Avatar asked Aug 03 '11 09:08

Denis Óbukhov


People also ask

How do I get customer attribute value in Magento 2?

In other cases where you would want to get custom customer attribute value in Magento 2 stores is integration with 3rd party APIs. The APIs would return the customer attributes value which is not the part of the default Magento 2 and you'd want to use them further and require these custom attributes values.

What is product attribute in Magento 2?

Product attribute properties determine how an attribute can be used in the catalog, its appearance and behavior in the store, and the data included in data transfer operations. The properties and labels associated with each attribute determine how it can be used and its presentation in the store.

What is EAV attribute in Magento?

Overview of Magento 2 EAV attribute To EAV (Entity Attribute Value) in Magento 2 is the core system when your business directly works with Magento 2 platform. Using EAV system allows auto-extending your models instead of there is an intervention into the database.


2 Answers

Mage::getResourceModel('catalog/product')->getAttributeRawValue($productId, 'attribute_code', $storeId); 
like image 121
Daniel Kocherga Avatar answered Sep 18 '22 16:09

Daniel Kocherga


A way that I know of:

$product->getResource()->getAttribute($attribute_code)         ->getFrontend()->getValue($product) 
like image 37
Lucas Moeskops Avatar answered Sep 18 '22 16:09

Lucas Moeskops