I would like to update the default position value that products are assigned when they are added to a category. When you update a category from the categories editor, new products are saved with a position of 0. When you add a product to a category via the tree when filling out the product, it saves with a position value of 1.
What I want to do is have items save with a position of 100 instead of 1.
Best Answer
You need to rewrite the method
Mage_Catalog_Model_Resource_Product::_saveCategories
Somewhere in there this is this:
Replace
1
with100
.To rewrite the resource model add this to the
config.xml
of your custom module inside the global tagThen create the class
[Namespace]_[Module]_Model_Resource_Product
that extendsMage_Catalog_Model_Resource_Product
, copy the method_saveCategories
to it and replace1
with100
.