To get product custom attribute value use following code:
$productid = 1;
$product = $_objectManager->get('Magento\Catalog\Model\Product')->load($productid);
$custom_attribute_value = $product->getResource()->getAttribute('custom_attribute_code')
->getFrontend()->getValue($product);
$productid = 1;
$product = $_objectManager->get('Magento\Catalog\Model\Product')->load($productid);
$custom_attribute_value = $product->getResource()->getAttribute('custom_attribute_code')
->getFrontend()->getValue($product);
Comments
Post a Comment