$attribute_set = Mage::getModel("eav/entity_attribute_set")->getCollection();
$attribute_set = $attribute_set->addFieldToFilter("attribute_set_name", $attributeSetName)->getFirstItem();
$attribute_set_id = $attribute_set->getAttributeSetId();
本文介绍了一种在 Magento 中通过名称筛选并获取特定属性集 ID 的方法。使用 EAV 模型进行数据库操作,通过字段过滤实现精确查找。
$attribute_set = Mage::getModel("eav/entity_attribute_set")->getCollection();
$attribute_set = $attribute_set->addFieldToFilter("attribute_set_name", $attributeSetName)->getFirstItem();
$attribute_set_id = $attribute_set->getAttributeSetId();

被折叠的 条评论
为什么被折叠?