예제 #1
0
                $setup = new Mage_Eav_Model_Entity_Setup('core_setup');
                $setup->addAttributeOption($option);
            }
            echo "Model " . $model->getAttributeCode() . " saved. options added ..........................ok. \n";
            //$model = Mage::getModel('catalog/resource_eav_attribute')->load($model->getId())->delete(); //die;
            //}
        }
        // set tax class options TODO: API
        $this->query("insert ignore into tax_class select * from {$this->oldDB}.tax_class");
        //die;
    }
}
$im = new Oberig_Import_Attributes();
$im->attributeSetMapping();
$im->attrSetsGroups();
$im->loadAttributes();
die;
//drop table oberig_attribute_set_mapping;
//create table `oberig_attribute_set_mapping` (
//`attribute_set_name` varchar(255) DEFAULT NULL,
//`attribute_group_name` varchar(255) DEFAULT NULL,
//`attribute_code` varchar(255) DEFAULT NULL
//);
//INSERT INTO `oberig_attribute_set_mapping`
//SELECT attribute_set_name,attribute_group_name,attribute_code FROM fashione_staging2.`eav_attribute_set` eas
//INNER JOIN fashione_staging2.`eav_attribute_group` eag
//ON eas.attribute_set_id = eag. attribute_set_id
//INNER JOIN fashione_staging2.`eav_entity_attribute` eea
//ON eea.attribute_set_id = eag.attribute_set_id AND eea.attribute_group_id = eag.attribute_group_id
//INNER JOIN fashione_staging2.`eav_attribute` ea
//ON ea.attribute_id = eea.attribute_id