Magento Load Product event observer?
magento, observer-pattern
Solution
You can use `catalog_product_load_after` event to add additional information to any product like this.
config.xml
<catalog_product_load_after>
<observers>
<MagentoDiary_FirstModule_Model_Observer>
<class>MagentoDiary_FirstModule_Model_Observer</class>
<method>updateProductName</method>
</MagentoDiary_FirstModule_Model_Observer>
</observers>
</catalog_product_load_after>
Observer.php looks like this
class MagentoDiary_FirstModule_Model_Observer{
public function updateProductName(Varien_Event_Observer $observer){
$product = $observer->getData('product');
$product->setName($product->getName().' Coooool !');
}
}
Problem
The store I am working on has some custom comunity and local modules that handles some custom items in connection with catalog product. I need an event observer in order to add some additional data to catalog item instance, when it is load. If this is the right approach, what is the event I should look for? If you have any other hints, snippets, I thank you in advance!