有没有一种标准的方法来检查Magento中的属性集中是否存在属性组?
我到处都看过,但是除了获取所有属性组的列表然后遍历它们之外,没有发现任何东西。
有更好的方法吗?请指教。
先感谢您。
嗯,在页面上发现了答案,该页面描述了如何添加属性集。以下是相关信息:
$model = Mage::getModel('eav/entity_setup', 'core_setup');
$attributeSetId = $model->getAttributeSetId('catalog_product', 'Default');
$attributeGroupId = $model->getAttributeGroup('catalog_product', $attributeSetId, 'name of attribute group here');
尚未对上面的代码进行大量测试,但是它做了我需要做的事情;我很快继续前进。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句