Here is my questions: What is the right event to hook in for adding a product to quote programmatically (entry sales_flat_quote_item table). Also i have to catch the items/products added to cart from an user/customer, because their data informations will determine the product which will be added programmatically. So the scenario would be:
- user/customer adds a product to cart
- find the right event for hook in
- fetch informations about the products added to cart
- add additional product to cart based on a product id and modified its data
In my opinion its better to work with the quote, before the products are written to the database.
I figure out how to add it through Mage_Sales_Model_Quote::_addCatalogProduct(). But i would like to do it through an event observer instead of overwriting core classes.
Best Answer
these are observer maches with your requirement.
Refer these links for events in magento