Pregunta

I will trying to get the attributes values but i can't do this values ?

enter image description here

¿Fue útil?

Solución

<?php 
$attribute = $product->getResource()->getAttribute('package_quantity');
if (empty($attribute->getFrontend()->getValue($product))) {
}else{
   echo "<strong>Package Quantity : </strong>",$attribute->getFrontend()->getValue($product); 
}

?>

Otros consejos

You can get the attribute value and attribute code as :

Attribute Value :

<?php echo $_product->getResource()->getAttribute('attribute_code')->getFrontend()->getValue($_product); ?>

Attribute Label :

<?php echo $_product->getResource()->getAttribute('attribute_code')->getStoreLabel();
Licenciado bajo: CC-BY-SA con atribución
No afiliado a magento.stackexchange
scroll top