문제

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

enter image description here

도움이 되었습니까?

해결책

<?php 
$attribute = $product->getResource()->getAttribute('package_quantity');
if (empty($attribute->getFrontend()->getValue($product))) {
}else{
   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();
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top