首页 > 代码库 > magento如何获取产品属性值 How to Obtain Custom Attribute Values in Magento

magento如何获取产品属性值 How to Obtain Custom Attribute Values in Magento

<div class="product-sku">SKU:<?php echo $_product->getSku();?>

            &nbsp;&nbsp; Brand:<?php 

            $attributes = $_product->getAttributes();  

        echo  $attributes[‘brand‘]->getFrontend()->getValue($_product);  

            ?>

            &nbsp;&nbsp; UNIT:<?php echo $_product->getUnit();?>

            </div>


magento如何获取产品属性值 How to Obtain Custom Attribute Values in Magento