开发者

How do I have to add a Manufacturers in Magento

开发者 https://www.devze.com 2023-01-20 04:57 出处:网络
How do I have to add the Manufacturers Attribute in Magento usin开发者_开发百科g php? Thanksprivate function addManufacturers($manufacturer){

How do I have to add the Manufacturers Attribute in Magento usin开发者_开发百科g php?

Thanks


private function addManufacturers($manufacturer){

        //add new manufacturer
        $option['attribute_id'] = 70; //manufacturer
        $option['value']['any_key_that_resolves_to_zero'][0] = $manufacturer;

        $setup = new Mage_Eav_Model_Entity_Setup('core_setup');
        $setup->addAttributeOption($option);
        return $this->getManufacturerId($manufacturer);

}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号