Magento: which table should be used in the following code? -
Magento: which table should be used in the following code? -
i read article http://inchoo.net/ecommerce/magento/how-to-add-new-custom-category-attribute-in-magento/comment-page-1/
there part of code in installer:
//this set info of custom attribute root category mage::getmodel('catalog/category') ->load(1) ->setimportedcatid(0) ->setinitialsetupflag(true) ->save(); //this set info of custom attribute default category mage::getmodel('catalog/category') ->load(2) ->setimportedcatid(0) ->setinitialsetupflag(true) ->save();
two question here:
function load has parameter. id. which table should used for?
what setimportedcatid here? it's setter, don't understad for.
magento categories still utilize eav table structure, table you're interested in
catalog_category_entity
however, won't able see category names here. info category objects persisted to
catalog_category_entity_varchar
indexed catalog_category_entity
table entity_id
.
i grepped around modern source trees , appears info property imported_cat_id
(which setter setting), based on patterns used elsewhere in magento scheme guess version of magento has code in category saving tree looks imported_cat_id
, , if it's set new category info based on old category. in other words, allows re-create category , save it's meta-data. setting 0 above, inchoo code telling magento new category.
that's guess though, it's not i'd worry about.
magento
Comments
Post a Comment