Magento Observer List

Magento® use observer pattern to fire actions for specific events. Its becomes useful because you can modify variables before event starts or right after event ended without making rewrite of Core class. This article has almost all magento default observers list which we use for development.

How and Where it dispatched?

Magento® dispatch observer at the models and blocks where specific event happens. There is no specific rules exist when you have to dispatch observers. There are a lot of default function which dispatch observers but not all extensions have observer dispatches. If you build the extension and it have events where another developer may want to modify result then it means for you to add your own observer dispatch. It wont affect performance and it will add more flexibility to your extension or modification.

What the code to dispatch observer in Magento® ?

Here is code example how Magento® dispatch customer registration success observer: The first parameter its the observer name. It should be unique for all observers for Magento® installation. The second parameter is array of variables passed to the observer. Its associative array where key will be variable name and value is object which passes to observer.

How to use Observers in Magento®

Use observer is pretty easy. The first what you need to do its add declaration of it in your extension's config.xml file. For example: At the code line 5 we declare name of observer, according to the previous example its customer_register_success. The lines 7 and 11 should have unique observer handler. To avoid issues with duplicate handles you can use your extension's namespace and module name there. The line 9 states what file to use, in our example it would be extension with name Namespace_Module and file will be in the Model folder Observer.php . Its why we have there module/observer, usually instead of module you will have name of your extension's folder but observer will remain same. All observer should be in the Observer.php file of Model folder. For Example: app/code/local/Namespace/Module/Model/Observer.php . The line 10 have method of our class which will be used when for event dispatch. The second step its to make our Observer.php file with corresponding method there. At the line 5 there we can see method name which we had in config.xml file at the line 10. In the our previous example we passed customer as associative array key and customer object as value ( Line 15 at the Magento® success registration observer dispatch example ). You can see that we get customer object by calling $observer->getCustomer() at the line 6, this way we get customer object which we passed into observer. We can also use $observer->getData('customer') for it.

The Magento® Observers List

Unfortunately Magento® doesn't provide list of all observers and its why we have made list of them. The list may not have all information about the observer but it has observer key and short description of it. For more details of it you can just search for it in the Magento® Core files and see at which file it dispatches to use it correctly.
Observer key Parameters Description
log_log_clean_beforelogbefore cleaning logs
log_log_clean_afterlogafter cleaning logs
log_visitor_collection_load_beforecollectionbefore log visitor collection loaded
visitor_initvisitorinit visitor on the site
api_user_authenticatedmodel, api_keyonce api user authenticated
page_block_html_topmenu_gethtml_beforemenu, blockbefore menu html
page_block_html_topmenu_gethtml_aftermenu, htmlafter menu html generated
adminhtml_block_eav_attribute_edit_form_initforminit attribute form values
eav_collection_abstract_load_beforecollectionbefore loading eav colletion
review_controller_product_init_beforecontroller_actionproduct review before load product
review_controller_product_initproductproduct review initilization
review_controller_product_init_afterproduct,controller_actionproduct review after initilizaion of product
review_review_collection_load_beforecollectionreview collection load before
cms_controller_router_match_beforerouter, conditioncms page router match before
cms_page_get_available_statusesstatusescms page statuses
cms_wysiwyg_config_prepareconfigprepare wysiwyg congiruration
cms_page_renderpage, controller_actionrender cms page action
cms_wysiwyg_images_static_urls_allowedresult,store_idCheck of using static urls
sendfriend_productproductProduct sent to friend action
catalog_block_product_list_collectioncollectionBefore html product list collection
catalog_product_upsellproduct, collection, limitUpdating collection with desired items
catalog_block_product_status_displaystatusDisplay Product Stock Status
catalog_product_type_configurable_priceproductPrepare Json Config for product
catalog_product_view_configresponse_objectProduct view config json values
catalog_controller_category_init_beforecontroller_actionBefore Init categories
catalog_controller_category_init_aftercategory, controller_actionAfter Init categories
catalog_product_compare_add_productproductAdd product to compare
catalog_category_tree_init_inactive_category_idstreeRetrieve inactive categories ids
catalog_category_tree_move_beforecategory, prev_parent, parentBefore move category in tree
catalog_category_tree_move_aftercategory, prev_node, parentAfter move category in tree
catalog_category_collection_load_beforecategory_collectionBefore load category colection
catalog_category_collection_load_aftercategory_collectionAfter load category caollection
catalog_category_add_is_active_filtercategory_collectionAfter Is Active Filter Applied
catalog_category_change_productscategory, product_idsSave category products relation
catalog_prepare_price_selectselect, table, store_id, response_objectPrepare price select
prepare_catalog_product_index_selectselect, entity_field, website_field, store_fieldAdd additional external limitation
prepare_catalog_product_price_index_tableindex_table, select, entity_id, customer_group_id, website_id, website_date, update_fieldsPrice Index
catalog_product_flat_prepare_columnscolumnsRetrieve catalog product flat table columns array
catalog_product_flat_prepare_indexesindexesRetrieve catalog product flat table indexes
catalog_product_flat_rebuildstore_id, tableUpdate events observer attributes
catalog_product_flat_update_productstore_id, table, product_idsUpdate flat data for product
category_movecategory, parent, category_id, prev_parent_id, parent_idCategory Move
catalog_product_validate_beforeproductBefore Validate Product Data
catalog_product_validate_afterproductAfter Validate Product Data
catalog_model_product_duplicatecurrent_product, new_productCreate duplicate product
catalog_product_is_salable_beforeproductProduct Salable before
catalog_product_is_salable_afterproduct, salableProduct salable after
catalog_product_delete_after_doneproductDelete product
catalog_product_status_updateproduct_id, store_id, statusUpdate status value for product
catalog_product_prepare_saveproduct, requestSave product custom option data
catalog_product_media_add_imageproduct, imageAdd image to media gallery
catalog_product_get_final_priceproduct, qtyGet product final price
catalog_product_type_grouped_priceproductProduct Final price depend of options
catalog_controller_product_init_beforecontroller_action, paramsBefore Init product
catalog_controller_product_initproductProduct Initilization
catalog_controller_product_init_afterproduct, controller_actionAfter product initilization at product page
catalog_controller_product_viewproductPrepare product render
prepare_catalog_product_index_selectselect, entity_field, website_field, store_field Add additional external limitation for search
catalogsearch_searchable_attributes_load_afterengine, attributesAfter load searchable Attributes
catalog_prepare_price_selectselect, table, store_id, response_objectaddRatedPriceFilter for search
catalogsearch_index_process_startstore_id, product_idsBefore start catalgo search index
admin_user_authenticate_beforeusername, userBefore admin authorization
core_collection_abstract_load_beforecollectionbefore load collection
core_collection_abstract_load_aftercollectionafter load collection
core_layout_update_updates_get_afterupdatesbefore layout updates applied
core_locale_set_localelocaleset current locale
currency_display_options_formingcurrency_options, base_codecreate currency for current locale
application_clean_cachetagsClean cache by tags
core_layout_block_create_afterblockAfter Block created
resource_get_tablenameresourse, model_entity, table_name, table_suffixGet Table Name
model_load_beforeboject, field, valueBefore load any model
model_load_afterobjectAdter model loaded
model_save_commit_afterobjectCallback function which called after transaction commit in resource model
core_copy_fieldset_$fieldset_$aspecttarget, source, rootCopy data from object|array to object|array containing fields from fieldset matching an aspect.
controller_action_postdispatch_adminhtmlcontroller_actionGoogle base post dispatch
index_process_change_statusprocess, statusChange process status
product_option_renderer_initblockWishlist option renderer init
wishlist_add_productwishlist, product, itemAdd product to Wishlist
wishlist_update_itemwishlist, product, itemUpdate Wishlist
wishlist_sharevwishlistShare wishlist
wishlist_item_collection_products_after_loadproduct_collectionLoad wishlist product collection
wishlist_item_add_afterwishlistAfter item added to wishlist
wishlist_add_itemitemWhen wishlist item added
wishlist_product_add_afteritemsAfter items added to shilist
bundle_product_view_configresponse_object, selectionView config of bundle product
catalog_product_prepare_index_selectwebsite, select, bindPrepare price index
prepare_catalog_product_price_index_tableindex_table, select, entity_id, customer_group_id, website_id, website_date, update_fieldsPrepare price index table
prepare_catalog_product_collection_pricescollection, store_idBundle Items Price Collection Preparation
catalog_product_get_final_priceproduct, qtyget bundle product final price
salesrule_validator_processrule, item, address, quote, qty, resultSales Rule validator process
sales_quote_address_discount_itemitemDiscount Item
salesrule_rule_condition_combineadditionalAdditional conditions for sales rule conditions
salesrule_rule_get_coupon_typestransport Get coupon coe types
review_controller_product_init_beforecontroller_actionXmlconnect review controller before init of product
review_controller_product_initproductXmlconnect review controller init of product
review_controller_product_init_afterproduct, controller_actionXmlconnect review controller init after
checkout_controller_onepage_save_shipping_methodrequests, quotesave shipping method action
wishlist_add_productwishlist, product, itemXmlconnect wishliast add product action
checkout_cart_add_product_completeproduct, request, responsecheckout add to cart complete action
enterprise_giftcardaccount_addstatus, codeXmlconnect Fail of giftaccount add in the cart
checkout_cart_update_item_completeitem, request, responseComplete of checkout cart item update
before_save_message_queuequeueMessageXmlConnect Queue message before save
checkout_controller_multishipping_shipping_postrequest, quoteMultishiping shipping post
checkout_multishipping_controller_success_actionorder_idsSuccess action of checkout
checkout_cart_product_add_afterquote_item, productAfter product added to the cart
checkout_cart_update_items_beforecart, infoBefore update cart items
checkout_cart_update_items_aftercart, infoAfter updae cart items
checkout_cart_save_beforecartBefore cart saved
checkout_cart_save_aftercartAfter cart saved
checkout_cart_product_update_afterquote_item, productAfter cart product update
custom_quote_processcheckout_sessiongetQuote action for checkot
checkout_quote_initquoteInit of quote
load_customer_quote_beforecheckout_sessionLoad data for customer quote and merge with current quote
checkout_quote_destroyquoteQuote destroy action
checkout_type_multishipping_set_shipping_itemsquoteAssign quote items to addresses and specify items qty
checkout_type_multishipping_create_orders_singleorder, addressCreate orders per each quote address
checkout_submit_all_afterorders, quote, recurring_profilesSubmit Order
checkout_multishipping_refund_allorders, quoteRefund Multishipping order
checkout_type_onepage_save_order_afterorder, quoteAfter order saved
checkout_allow_guestquote, store, resultIs checkot allowed for guest action
rss_wishlist_xml_callbackproductXml wishlist callback
rss_catalog_new_xml_callbackproductRSS new xml
rss_catalog_notify_stock_collection_selectcollectionNotify Stock collection RSS select
rss_catalog_tagged_item_xml_callbackproductRss tagged item
rss_catalog_special_xml_callbackproductSpecial Rss xml callback
rss_catalog_review_collection_selectcollectionRSS reviews collection
rss_catalog_category_xml_callbackproductRSS categories
rss_order_new_collection_selectcollectionRSS orders collection
poll_vote_addpoll, voteRSS of vote add action
adminhtml_block_promo_widget_chooser_prepare_collectioncollectionPrepare Promo Widget Collection
adminhtml_promo_catalog_edit_tab_main_prepare_formformCatalog promo rules prepare tab
adminhtml_block_salesrule_actions_prepareformformSales rules prepare form
adminhtml_promo_quote_edit_tab_coupons_form_prepare_formformPrepare coupons form
adminhtml_promo_quote_edit_tab_main_prepare_formformPreprare form of coupon rule main tab
api_user_html_beforeblockAdminhtml Permissions user block
adminhtml_widget_grid_filter_collectioncollection, filter_valuesAdminhtml Wigdet Grid Filter Collection
adminhtml_cms_page_edit_tab_main_prepare_formformAdminhtml Cms Page Edit Main Tab Form
adminhtml_cms_page_edit_tab_design_prepare_formformAdminhtml Cms Page Edit Design Tab Form
adminhtml_cms_page_edit_tab_meta_prepare_formformAdminhtml Cms Page Edit Meta Tab Form
adminhtml_cms_page_edit_tab_content_prepare_formformAdminhtml Cms Page Edit Content Tab Form
adminhtml_widget_container_html_beforeblockAdminhtml Widget Container Before Html
adminhtml_catalog_category_tree_is_moveableoptionsAdminhtml Is category moveable
adminhtml_catalog_category_tree_can_add_root_categorycategory, options, storeAdminhml Check availability of adding root category
adminhtml_catalog_category_tree_can_add_sub_categorycategory, options, storeAdminhtml Check availability of adding sub category
adminhtml_catalog_category_tabstabsAdminhtml Catalog Category Tabs
adminhtml_catalog_category_edit_prepare_formformAdminhtml Category Edit Form
adminhtml_catalog_product_attribute_set_toolbar_main_html_beforeblockAdminhtml Catalog Product Attribute set toolbar
adminhtml_catalog_product_attribute_set_main_html_beforeblockAdminhtml Attribute Set Main Block
adminhtml_catalog_product_edit_prepare_formformAdminhtml product edit form
adminhtml_catalog_product_edit_element_typesresponseAdminhtml product edit element types
adminhtml_product_attribute_typesresponseAdminhtml product edit set attribute types
adminhtml_catalog_product_attribute_edit_prepare_formform, attributeAdminhtml product attribute edit form
adminhtml_catalog_product_grid_prepare_massactionblockAdminhtml product mass actions
adminhtml_catalog_product_form_prepare_excluded_field_listobjectAdminhtml Product Edit excluded fields
adminhtml_catalog_product_edit_tab_attributes_create_html_beforeblockAdminhtml create Attributes
catalog_product_edit_form_render_recurringresult, product_element, productAdminhtml Product Edit Recurrent Tab
catalog_product_gallery_prepare_layoutblockAdminhtml Product Edit Gallery
adminhtml_block_html_beforeblockAdminhtml before each admin block
permissions_user_html_beforeblockAdminhtml before permissions block
adminhtml_customer_orders_add_action_rendererrenderer, rowAdminhtml Customer Order Add Renderer
adminhtml_store_edit_form_prepare_formformAdminhtml Store Edit Form
adminhtml_system_config_advanced_disableoutput_render_beforemodulesAdminhtml Disable Modules
adminhtml_block_system_config_init_tab_sections_beforesectionAdminhtml System Config Sections Before
adminhtml_controller_catalogrule_prepare_saverequestAdminhtml Catalogrule prepare save
adminhtml_controller_salesrule_prepare_saverequestAdminhtml Sales Rule Prepare Save
adminhtml_cache_refresh_typetypeAdminhtml Flush Cache by Type
cms_page_prepare_savepage, requestAdminhtml Save Cms Page
adminhtml_cmspage_on_deletetitle, statusAdminhtml Delete Cms Page
catalog_product_new_actionproductAdminhtml New Product
catalog_product_edit_actionproductAdminhtml Edit Product
catalog_product_prepare_saveproduct, requestAdminhtml Prepare Save Product
product_duplicate_attributesproduct, storeTo, storeFromAdminhtml Product Copy Attributes Between Stores
catalog_controller_product_deleteproductAdminhtml Delete Product
category_prepare_ajax_responseresponse, controller Adminhtml Category Prepare Ajax Response
catalog_category_prepare_savecategory, requestAdminhtml Category Prepare Save
catalog_controller_category_deletecategoryAdminhtml Delete Category
catalog_product_stock_item_mass_changeproductsAdminhtml Stock Item Mass Change
catalog_product_to_website_changeproductsAdminhtml Product o Website Change
catalog_product_gallery_upload_image_afterresult, actionAdminhtml After Gallery Upload
admin_permissions_role_prepare_saveobject, requestAdminhtml Permissions Role Save
sales_order_status_unassign_beforestatus, stateAdminhtm Before Order Status Unassign
create_order_session_quote_initializedsession_quoteAdminhtml Create Order Session Quote Init
adminhtml_sales_order_create_process_data_beforeorder_create_model, request_model, sessionAdminhtml Create Order Process Action Data
adminhtml_sales_order_create_process_dataorder_create_model, requestAdminhtml Create Order Process Action Data Before
adminhtml_sales_order_creditmemo_register_beforecreditmemo, requestAdminhtml before Register Credit Memo
on_view_reportreportAdminhtml View Report
adminhtml_customer_prepare_savecustomer, requestAdminhtml Customer Save
adminhtml_customer_save_aftercustomer, requestAdminhtml Customer Save After
admin_system_config_section_save_afterwebsite, store, sectionAdminhtml System Config Save After
admin_system_config_changed_section_{$section}website, store, sectionAdminhtml System Config Section Changed
store_group_savegroupAdminhtml System Store Group Save
store_editstoreAdminhtml System Store Group Edit
store_deletestoreAdminhtml Store Delete
{{event_prefix}}_finish_beforeadapterAdminhtml Import Adapter. Each adapter has event prefix
adminhtml_init_system_configconfigAdminhtml Init System Config
model_config_data_save_beforeobjectAdminhtml Config Save Before
init_from_order_session_quote_initializedsession_quote Init Quote From Order
sales_convert_order_to_quoteorder, quoteConvert Order to Quote
sales_convert_order_item_to_quote_itemorder_item, quote_itemConvert Order Item to Quote Item
checkout_submit_all_afterorder, quoteCheckout Submit All After
catalogindex_prepare_price_selectselect, table, store_id, response_objectPreprare Price Select
catalogindex_plain_reindex_afterproductsPlain Reindex After
catalogindex_get_minimal_priceindexer, product_ids, storeIndex Product Minimal Price
{{event_object}}_set_sales_ordercollection, {{event_object}}, orderSet sales order model
sales_resource_init_virtual_grid_columnsresourseInit Virtual Grid Columns
sales_resource_update_grid_recordsproxyUpdate Records in grid table
sales_sale_collection_query_beforecollectionResource Sale Collection
sales_order_place_beforeorderBefore order Placed
sales_order_place_afterorderAfter Order Placed
order_cancel_afterorderAfter Order Cancelled
clear_expired_quotes_beforesales_observerBefore Clean Expired Quotes
sales_quote_remove_itemquote_itemQuote remove Item
sales_quote_add_itemquote_itemQuote Add Item
sales_quote_product_add_afteritemsQuote Add Product After
sales_quote_collect_totals_beforequoteQuote Collect Totals Before
sales_quote_collect_totals_afterquoteQuote Collect Totals After
sales_quote_merge_beforequote, sourceBefore Quote Mege
sales_quote_merge_afterquote, sourceAfter Quote Mege
pdf_item_draw_aftertransport_object, entity_itemPDF Draw Item Process
sales_order_invoice_payinvoiceInvoice Pay Event
sales_order_invoice_cancelinvoiceInvoice Cancel
sales_order_invoice_registerinvoice, orderInvoice Register
sales_order_creditmemo_refundcreditmemoCreditmemo Refund
sales_order_creditmemo_cancelcreditmemoCancel Creditmemo
sales_order_payment_place_startpaymentStart Place Payment
sales_order_payment_place_endpaymentPayment Placed
sales_order_payment_capturepayment, invoiceInvoice Payment Capture
sales_order_payment_paypayment, invoiceInvoice Payment Pay
sales_order_payment_cancel_invoicepayment, invoiceInvoice Payment Cancel
sales_order_payment_voidpayment, invoiceInvoice Payment Void
sales_order_payment_refundpayment, creditmemoPayment Refund
sales_html_txn_idtransaction, payementTransaction
sales_order_payment_cancel_creditmemopayment, creditmemoPayment Cancel Creditmemo
sales_order_payment_cancelpaymentCancel Payment
sales_order_item_cancelitemsOrder Item Cancel
sales_order_payment_transaction_load_by_txn_id_beforetxn_idBefore Load Transaction
sales_quote_address_collect_totals_beforequote_addressBefore Collect Totals
sales_quote_address_collect_totals_afterquote_addressAfter Collect Totals
sales_quote_config_get_product_attributesattributeQuote get product attributes
sales_quote_address_discount_itemitemDiscount Quote Item
sales_quote_payment_import_data_beforepayment, inputBefore Import Payment
sales_quote_item_qty_set_afteritemSet Item Quote Item Quantity
sales_quote_item_set_productproduct, quote_itemSet Quote Item Product
sales_convert_quote_to_orderorder, quoteConvert Quote to Order
sales_convert_quote_address_to_orderaddress, order_addressConvert Quote Address To Order Address
sales_convert_quote_item_to_order_itemorder_item, itemConvert Quote Item to Order Item
sales_prepare_amount_expressioncollection, expression_objectGet Sales Amount Expression
tax_rate_data_fetchrequestGet Tax Rate
catalog_product_import_finish_beforeadapterBefore Finish Product Import
tag_tag_product_collection_load_aftercollectionTag Product Collection Load After
customer_register_successaccount_controller, customerCustomer Success Registration
customer_address_formattype, addressFormat Customer's Address
customer_address_validation_afteraddressCustomer Address Validation After
customer_session_initcustomer_sessionInit Customer Session
customer_logincustomerCustomer Login
customer_logoutcustomerCustomer Logout
customer_customer_authenticatedmodel, passwordCustomer Authenticated
customer_registration_is_allowedresultIs registration ALlowed
rule_environment_collectenvCollect application environment for rules filtering
admin_system_config_changed_section_currency_before_reinitwebsite, storeBefore Changed Currency at the Admin Config
admin_system_config_changed_section_currencywebsite, storeChanged Currency at the Admin Config
paypal_prepare_line_itemspaypal_cartPrepare Paypal Cart Items
paypal_payment_transaction_load_by_txn_id_beforepaypal_payment_transaction, txn_id Load Paypal Transaction Before
paypal_payment_transaction_load_by_txn_id_afterpaypal_payment_transactionLoad Paypal Transaction After
gift_options_prepare_itemsitemsPrepare Giftcard Items
payment_form_block_to_html_beforeblockPayment Block To Html
payment_info_block_prepare_specific_informationtransport, payment, blockPrepare Payment Information
payment_method_is_activeresult, method_instance, quoteIs Active Payment Method
Created On December 16, 2015
You May Also Like