I am willing to clarify my magento related doubts with some of magento experts.

  1. Did magento use event driven architecture?

  2. If magento use event driven architecture, Where did they use?

  3. Give one example of event driven architecture in magento:

  1. Yes
  2. Look for the text Mage::dispatchEvent in the code.
  3. In the method Mage_Catalog_Block_Product_Abstract::displayProductStockStatus there is this line that dispatches an event.

    Mage::dispatchEvent('catalog_block_product_status_display', array('status' => $statusInfo));

In app/code/core/Mage/CataogInventory/etc/config.xml there is this piece of code. that marks a hook to that event.


This means that the method displayProductStatusInfo from the class Mage_CatalogInventory_Model_Observer is called.

I hope I was fast enough and your homework is not overdue.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.