How Magento creates & saves product? Need File & Function name for the same..?

Go To StackoverFlow.com

1

I am interested to know which file is used in Magento which create products in Magento? In Magento, we create New Product from Catalog->Manage Product->Add Product.

Then after selecting product type & attribute set, we insert necessary product detials & last we press SAVE tab. Now I want this file/function/code location through which Magento saves product in database?

How to get product Id from that file? Also how to get Category Id to which any particular product is assigned?

2012-04-04 05:46
by Prat


2

the following is the path of the controller file which used in the product save

app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php

and the method used for this is public function saveAction() {}

cheers..

Thanks, jeet

2012-04-04 06:19
by Jitendra
HI Jitendra, How to get category Id for which that product is get saved from ProductController.php page - Prat 2012-04-06 07:29


2

I am not sure whether this will help u a lot, but try to start your search from:

Mage_Adminhtml_Catalog_ProductController   saveAction

Moreover debug_backtrace() function might help u a lot.

2012-04-04 06:13
by Jevgeni Smirnov
Ads