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

enter image description here

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


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();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.