2010-09-16 16 views

cevap

29

şey böyle ...

+0

Tanrı sizi korusun, bu sorunu çözmek için 8 saat çalıştım: D – zuzuleinen

0

Bunu yapacağını tam olarak nasıl belirli değilim, ama ben Mage_Eav_Model_Mysql4_Entity_Attribute_Collection ve Mage_Eav_Model_Entity_Attribute_Group kullanarak doğru yönde alacak hayal ediyorum:

$attribute_set_name = 'your attribute set name here'; 
$group_name = 'your attribute group here'; 
$attribute_code = 'your attribute code here'; 

$setup = new Mage_Eav_Model_Entity_Setup('core_setup'); 

      //-------------- add attribute to set and group 
      $attribute_set_id=$setup->getAttributeSetId('catalog_product', $attribute_set_name); 
      $attribute_group_id=$setup->getAttributeGroupId('catalog_product', $attribute_set_id, $group_name); 
      $attribute_id=$setup->getAttributeId('catalog_product', $attribute_code); 

      $setup->addAttributeToSet($entityTypeId='catalog_product',$attribute_set_id, $attribute_group_id, $attribute_id); 
İlgili konular