【发布时间】:2013-01-19 12:09:19
【问题描述】:
如何检查产品属性集中是否存在属性?
我需要知道一个产品的属性集是否有一个属性。
我得到的属性是:
$attrPricekg = Mage::getModel('catalog/product')->load($_product->getId())->getPricekg();
如果产品属性集中存在属性,$attrPricekg 显示:为产品设置值 如果没有为产品设置值,则为 0。
如果产品属性集中不存在该属性,则 $attrPricekg 显示 0。这是我的问题。我需要避免这种情况,我想检查该产品是否不存在该属性。
谢谢。
【问题讨论】:
标签: magento attributes product catalog