Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

Price history
Jr. Member
Total Posts:  5
Joined:  2011-06-14

Hello. So I was surfing the internet and I found a store, which has price history for each product which I found really interesting and great way for customer to show what prices the products have a week ago or yesterday. My current store has 1700 products, which are automatically update every night at 00:00 with a cronjob I made(the data is being taken from my suplier\’s xml file). So all of the products are being update every night. I found this event in magento: catalog_controller_product_init_after from what I think, it is used after opening a product? So if I create a module, which reads and saves the price after update I could use the data to make a chart or a table? If the catalog_controller_product_init_after is actually used like that, I would like to know how could I use it? Whether it should be used in a helper or in a model. I am kind of new to creating modules, but I’m not new to php, so I’m still in magento module creating learning mode smile

Obviously the data needs to be saved in mysql.

So I need to know if catalog_controller_product_init_after is a event, which loads a function(for example) after a product save and if so, I would like to get some tips on using this event smile

I think this would be a really great module for all those who use cronjobs to update prices from their suppliers smile
if I get it working, I would share it with the community smile

I’m using Magento community edition Thank you for your replies and support smile

Attached a example of the price history I found on the internet.


class Mage_MyModule_Model_Observer
public function some_event_handle($observer)
$order $event->getOrder();
$customer $event->getCustomer();
// ... add my custom code to be spawned during the event
    // ... may update the argument objects, or do any other action.
Just found this code on the forums, which helped with the event. Now the question remains the same: is catalog_controller_product_init_after executed after saving a product?
Image Attachments
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top