When creating new products in the Magento Admin, there are a few
fields that you often fill out with the same values over and over again.
Values such as the product status, tax class, stock availability,
weight, etc.
Wouldn’t it be nice to have the system automatically assign default values to these fields every time you create a new product? Well good news! You can easily accomplish this by hooking into Magento’s catalog_product_new_action event.
I’m not going to cover how to create new modules in Magento, but here is the basic structure and files you’ll need to accomplish this. Make sure to provide your own value anywhere Namespace is referenced below.
/app/code/local/Namespace/Catalog/etc/config.xml
/app/code/local/Namespace/Catalog/Model/Product/Observer.php
2) Place the following in the Observer.php file. Set product default values as desired.
3) Finally, you’ll need to activate your new module by creating the file below with the following contents.
/app/etc/modules/Namespace_All.xml
Make sure to clear the Magento cache when you’re done with this step as well!
Wouldn’t it be nice to have the system automatically assign default values to these fields every time you create a new product? Well good news! You can easily accomplish this by hooking into Magento’s catalog_product_new_action event.
I’m not going to cover how to create new modules in Magento, but here is the basic structure and files you’ll need to accomplish this. Make sure to provide your own value anywhere Namespace is referenced below.
/app/code/local/Namespace/Catalog/etc/config.xml
/app/code/local/Namespace/Catalog/Model/Product/Observer.php
1) Place the following in the config.xml file listed above.
/app/etc/modules/Namespace_All.xml
Make sure to clear the Magento cache when you’re done with this step as well!
No comments:
Post a Comment