码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2014-11-04 15:11:11      阅读:177      评论:0      收藏:0      [点我收藏+]

标签: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

标签:magento

原文地址:http://jyb2014.blog.51cto.com/9155315/1571690

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!