In this post we’re gonna show you how to use events in Magento 2. But first we need to understand about events and observers. The events and observers implementation in Magento 2 is based on the publish-subscribe pattern. Using events and observers, you can run your custom code in response to a specific Magento event or even a custom event.

What is events in Magento?

Events are dispatched by modules when certain actions are triggered. In addition to its own events, Magento allows you to create your own events that can be dispatched in your code. When an event is dispatched, it can pass data to any observers configured to watch that event.

What is observers in Magento?

Observers are a certain type of Magento class that can influence general behavior, performance, or change business logic. Observers are executed whenever the event they are configured to watch is dispatched by the event manager.

Now that we understand the terminologies, let’s put them into use!

1. Create event.xml file

You can create event.xml file for different areas:

  • Global area: app/code/Simi/HelloWorld/etc/events.xml
  • Frontend area: app/code/Simi/HelloWorld/etc/frontend/events.xml
  • Admin area: app/code/Simi/HelloWorld/etc/adminhtml/events.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
 <event name="helloworld_display">
 <observer name="update_helloworld_display" instance="Simi\HelloWorld\Observer\Update" />
 </event>
</config>

2. Create Observer class

To create an observer, you must place your class file under your <module-root>/Observer directory. Your observer class should implement Magento\Framework\Event\ObserverInterface and define its execute function.

Below is an example of the basic observer class structure:

namespace MyCompany\MyModule\Observer;

use Magento\Framework\Event\ObserverInterface;

class MyObserver implements ObserverInterface
{
 public function __construct()
 {
 //Observer initialization code...
 //You can use dependency injection to get any class this observer may need.
 }

public function execute(\Magento\Framework\Event\Observer $observer)
 {
 //Observer execution code...
 }
}

3. Dispatch event

Events can be dispatched using the Magento\Framework\Event\Manager class. This class can be obtained through dependency injection by defining the dependency in your constructor.

To dispatch an event, call the dispatch function of the event manager class and provide it with the name of the event you want to dispatch along with an array of data you wish to provide to observers.

The following example shows you how to dispatch an event with and without an array of data.

namespace MyCompany\MyModule;
use Magento\Framework\Event\ObserverInterface;
class MyClass{
 /**
 * @var EventManager
 */
 private $eventManager;

public function __construct(\Magento\Framework\Event\Manager $eventManager){
 $this->eventManager = $eventManager;
 }

public function something(){
 $eventData = null;
 // Code...
 $this->eventManager->dispatch('my_module_event_before');
 // More code that sets $eventData...
 $this->eventManager->dispatch('my_module_event_after',['myEventData'=>$eventData]);
 }
}

Magento 2 events list

FileEvent name
app/code/Magento/Authorizenet/Controller/Directpost/Payment/Place.phpcheckout_directpost_placeOrder
app/code/Magento/Backend/Block/System/Store/Edit/AbstractForm.phpadminhtml_store_edit_form_prepare_form
app/code/Magento/Backend/Block/Template.phpadminhtml_block_html_before
app/code/Magento/Backend/Block/Widget/Grid.phpbackend_block_widget_grid_prepare_grid_before
app/code/Magento/Backend/Console/Command/CacheCleanCommand.phpadminhtml_cache_flush_system
app/code/Magento/Backend/Console/Command/CacheFlushCommand.phpadminhtml_cache_flush_all
app/code/Magento/Backend/Controller/Adminhtml/Cache/CleanImages.phpclean_catalog_images_cache_after
app/code/Magento/Backend/Controller/Adminhtml/Cache/CleanMedia.phpclean_media_cache_after
app/code/Magento/Backend/Controller/Adminhtml/Cache/CleanStaticFiles.phpclean_static_files_cache_after
app/code/Magento/Backend/Controller/Adminhtml/Cache/FlushAll.phpadminhtml_cache_flush_all
app/code/Magento/Backend/Controller/Adminhtml/Cache/FlushSystem.phpadminhtml_cache_flush_system
app/code/Magento/Backend/Controller/Adminhtml/System/Design/Save.phptheme_save_after
app/code/Magento/Backend/Controller/Adminhtml/System/Store/DeleteStorePost.phpstore_delete
app/code/Magento/Backend/Controller/Adminhtml/System/Store/Save.phpstore_group_save
app/code/Magento/Backend/Controller/Adminhtml/System/Store/Save.phpNO_MATCH
app/code/Magento/Backend/Model/Auth.phpbackend_auth_user_login_success
app/code/Magento/Backend/Model/Auth.phpbackend_auth_user_login_failed
app/code/Magento/Backend/Model/Auth.phpbackend_auth_user_login_failed
app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.phpcatalog_product_option_price_configuration_after
app/code/Magento/Bundle/Model/Product/Price.phpprepare_catalog_product_collection_prices
app/code/Magento/Bundle/Model/Product/Price.phpcatalog_product_get_final_price
app/code/Magento/Bundle/Model/Product/Price.phpcatalog_product_get_final_price
app/code/Magento/Bundle/Model/ResourceModel/Indexer/Price.phpcatalog_product_prepare_index_select
app/code/Magento/Bundle/Pricing/Price/BundleSelectionPrice.phpcatalog_product_get_final_price
app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.phpadminhtml_catalog_category_edit_prepare_form
app/code/Magento/Catalog/Block/Adminhtml/Category/Tabs.phpadminhtml_catalog_category_tabs
app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.phpadminhtml_catalog_category_tree_is_moveable
app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.phpadminhtml_catalog_category_tree_can_add_root_category
app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.phpadminhtml_catalog_category_tree_can_add_sub_category
app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.phpproduct_attribute_form_build
app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Front.phpproduct_attribute_form_build_front_tab
app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Front.phpadminhtml_catalog_product_attribute_edit_frontend_prepare_form
app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Main.phpadminhtml_product_attribute_types
app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Main.phpproduct_attribute_form_build_main_tab
app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Grid.phpproduct_attribute_grid_build
app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/NewAttribute/Product/Attributes.phpadminhtml_catalog_product_edit_prepare_form
app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/NewAttribute/Product/Attributes.phpadminhtml_catalog_product_edit_element_types
app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.phpadminhtml_catalog_product_attribute_set_main_html_before
app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Main.phpadminhtml_catalog_product_attribute_set_toolbar_main_html_before
app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Attributes.phpadminhtml_catalog_product_form_prepare_excluded_field_list
app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes/Create.phpadminhtml_catalog_product_edit_tab_attributes_create_html_before
app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.phpadminhtml_catalog_product_edit_prepare_form
app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.phpadminhtml_catalog_product_edit_element_types
app/code/Magento/Catalog/Block/Adminhtml/Product/Grid.phpadminhtml_catalog_product_grid_prepare_massaction
app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.phpcatalog_product_gallery_prepare_layout
app/code/Magento/Catalog/Block/Product/AbstractProduct.phpcatalog_block_product_status_display
app/code/Magento/Catalog/Block/Product/ListProduct.phpcatalog_block_product_list_collection
app/code/Magento/Catalog/Block/Product/ProductList/Upsell.phpcatalog_product_upsell
app/code/Magento/Catalog/Block/Product/View/Options.phpcatalog_product_option_price_configuration_after
app/code/Magento/Catalog/Block/Product/View.phpcatalog_product_view_config
app/code/Magento/Catalog/Block/Rss/Category.phprss_catalog_category_xml_callback
app/code/Magento/Catalog/Block/Rss/Product/NewProducts.phprss_catalog_new_xml_callback
app/code/Magento/Catalog/Block/Rss/Product/Special.phprss_catalog_special_xml_callback
app/code/Magento/Catalog/Block/ShortcutButtons.phpshortcut_buttons_container
app/code/Magento/Catalog/Controller/Adminhtml/Category/Delete.phpcatalog_controller_category_delete
app/code/Magento/Catalog/Controller/Adminhtml/Category/Edit.phpcategory_prepare_ajax_response
app/code/Magento/Catalog/Controller/Adminhtml/Category/Save.phpcatalog_category_prepare_save
app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute/Save.phpcatalog_product_to_website_change
app/code/Magento/Catalog/Controller/Adminhtml/Product/Edit.phpcatalog_product_edit_action
app/code/Magento/Catalog/Controller/Adminhtml/Product/Gallery/Upload.phpcatalog_product_gallery_upload_image_after
app/code/Magento/Catalog/Controller/Adminhtml/Product/NewAction.phpcatalog_product_new_action
app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.phpcontroller_action_catalog_product_save_entity_after
app/code/Magento/Catalog/Controller/Category/View.phpcatalog_controller_category_init_after
app/code/Magento/Catalog/Controller/Product/Compare/Add.phpcatalog_product_compare_add_product
app/code/Magento/Catalog/Controller/Product/Compare/Remove.phpcatalog_product_compare_remove_product
app/code/Magento/Catalog/Helper/Product/View.phpcatalog_controller_product_view
app/code/Magento/Catalog/Helper/Product.phpcatalog_controller_product_init_before
app/code/Magento/Catalog/Helper/Product.phpcatalog_controller_product_init_after
app/code/Magento/Catalog/Model/Category.php_move_before
app/code/Magento/Catalog/Model/Category.php_move_after
app/code/Magento/Catalog/Model/Category.phpcategory_move
app/code/Magento/Catalog/Model/Product/Action.phpcatalog_product_attribute_update_before
app/code/Magento/Catalog/Model/Product/Attribute/Source/Inputtype.phpadminhtml_product_attribute_types
app/code/Magento/Catalog/Model/Product/Type/AbstractType.phpNO_MATCH
app/code/Magento/Catalog/Model/Product/Type/Price.phpcatalog_product_get_final_price
app/code/Magento/Catalog/Model/Product.php_validate_before
app/code/Magento/Catalog/Model/Product.php_validate_after
app/code/Magento/Catalog/Model/Product.phpcatalog_product_is_salable_before
app/code/Magento/Catalog/Model/Product.phpcatalog_product_is_salable_after
app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php_load_before
app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php_load_after
app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php_add_is_active_filter
app/code/Magento/Catalog/Model/ResourceModel/Category/Flat/Collection.php_load_before
app/code/Magento/Catalog/Model/ResourceModel/Category/Flat/Collection.php_load_after
app/code/Magento/Catalog/Model/ResourceModel/Category/Flat/Collection.php_add_is_active_filter
app/code/Magento/Catalog/Model/ResourceModel/Category/Flat.phpcatalog_category_tree_init_inactive_category_ids
app/code/Magento/Catalog/Model/ResourceModel/Category/Flat.phpcatalog_category_flat_loadnodes_before
app/code/Magento/Catalog/Model/ResourceModel/Category/Tree.phpcatalog_category_tree_init_inactive_category_ids
app/code/Magento/Catalog/Model/ResourceModel/Category.phpcatalog_category_change_products
app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.phpcatalog_prepare_price_select
app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.phpcatalog_product_collection_load_after
app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.phpcatalog_product_collection_before_add_count_to_categories
app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.phpcatalog_product_collection_apply_limitations_after
app/code/Magento/Catalog/Model/ResourceModel/Product/Compare/Item/Collection.phpcatalog_product_compare_item_collection_clear
app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Eav/AbstractEav.phpprepare_catalog_product_index_select
app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Eav/Decimal.phpprepare_catalog_product_index_select
app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Eav/Source.phpprepare_catalog_product_index_select
app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Eav/Source.phpprepare_catalog_product_index_select
app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/DefaultPrice.phpprepare_catalog_product_index_select
app/code/Magento/Catalog/Model/ResourceModel/Product.phpcatalog_product_delete_after_done
app/code/Magento/Catalog/Model/Rss/Product/NotifyStock.phprss_catalog_notify_stock_collection_select
app/code/Magento/Catalog/Plugin/Model/Product/Action/UpdateAttributesFlushCache.phpclean_cache_by_tags
app/code/Magento/CatalogImportExport/Model/Import/Product.phpcatalog_product_import_bunch_delete_after
app/code/Magento/CatalogImportExport/Model/Import/Product.phpcatalog_product_import_finish_before
app/code/Magento/CatalogImportExport/Model/Import/Product.phpcatalog_product_import_bunch_save_after
app/code/Magento/CatalogInventory/Model/Indexer/Stock/AbstractAction.phpclean_cache_by_tags
app/code/Magento/CatalogRule/Block/Adminhtml/Promo/Catalog/Edit/Tab/Main.phpadminhtml_promo_catalog_edit_tab_main_prepare_form
app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog/Save.phpadminhtml_controller_catalogrule_prepare_save
app/code/Magento/CatalogRule/Model/Indexer/AbstractIndexer.phpclean_cache_by_tags
app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/DataProvider.phpcatelogsearch_searchable_attributes_load_after
app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.phpcatelogsearch_searchable_attributes_load_after
app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext.phpcatalogsearch_reset_search_result
app/code/Magento/Checkout/Block/QuoteShortcutButtons.phpshortcut_buttons_container
app/code/Magento/Checkout/Controller/Cart/Add.phpcheckout_cart_add_product_complete
app/code/Magento/Checkout/Controller/Cart/UpdateItemOptions.phpcheckout_cart_update_item_complete
app/code/Magento/Checkout/Controller/Onepage/SaveOrder.phpcheckout_controller_onepage_saveOrder
app/code/Magento/Checkout/Controller/Onepage/Success.phpcheckout_onepage_controller_success_action
app/code/Magento/Checkout/Helper/Data.phpcheckout_allow_guest
app/code/Magento/Checkout/Model/Cart.phpcheckout_cart_product_add_after
app/code/Magento/Checkout/Model/Cart.phpcheckout_cart_update_items_before
app/code/Magento/Checkout/Model/Cart.phpcheckout_cart_update_items_after
app/code/Magento/Checkout/Model/Cart.phpcheckout_cart_save_before
app/code/Magento/Checkout/Model/Cart.phpcheckout_cart_save_after
app/code/Magento/Checkout/Model/Cart.phpcheckout_cart_product_update_after
app/code/Magento/Checkout/Model/Session.phpcustom_quote_process
app/code/Magento/Checkout/Model/Session.phpcheckout_quote_init
app/code/Magento/Checkout/Model/Session.phpload_customer_quote_before
app/code/Magento/Checkout/Model/Session.phpcheckout_quote_destroy
app/code/Magento/Checkout/Model/Session.phprestore_quote
app/code/Magento/Checkout/Model/Type/Onepage.phpcheckout_type_onepage_save_order_after
app/code/Magento/Checkout/Model/Type/Onepage.phpcheckout_submit_all_after
app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Content.phpadminhtml_cms_page_edit_tab_content_prepare_form
app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Design.phpadminhtml_cms_page_edit_tab_design_prepare_form
app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Main.phpadminhtml_cms_page_edit_tab_main_prepare_form
app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Meta.phpadminhtml_cms_page_edit_tab_meta_prepare_form
app/code/Magento/Cms/Controller/Adminhtml/Page/Delete.phpadminhtml_cmspage_on_delete
app/code/Magento/Cms/Controller/Adminhtml/Page/Delete.phpadminhtml_cmspage_on_delete
app/code/Magento/Cms/Controller/Adminhtml/Page/Save.phpcms_page_prepare_save
app/code/Magento/Cms/Controller/Router.phpcms_controller_router_match_before
app/code/Magento/Cms/Helper/Page.phpcms_page_render
app/code/Magento/Cms/Helper/Wysiwyg/Images.phpcms_wysiwyg_images_static_urls_allowed
app/code/Magento/Config/Block/System/Config/Form/Fieldset/Modules/DisableOutput.phpadminhtml_system_config_advanced_disableoutput_render_before
app/code/Magento/Config/Model/Config.phpNO_MATCH
app/code/Magento/ConfigurableProduct/Model/Product/Validator/Plugin.phpcatalog_product_validate_variations_before
app/code/Magento/Cookie/Controller/Index/NoCookies.phpcontroller_action_nocookies
app/code/Magento/CurrencySymbol/Model/System/Currencysymbol.phpadmin_system_config_changed_section_currency_before_reinit
app/code/Magento/CurrencySymbol/Model/System/Currencysymbol.phpadmin_system_config_changed_section_currency
app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Carts.phpadminhtml_block_html_before
app/code/Magento/Customer/Controller/Account/CreatePost.phpcustomer_register_success
app/code/Magento/Customer/Controller/Adminhtml/Index/Save.phpadminhtml_customer_prepare_save
app/code/Magento/Customer/Controller/Adminhtml/Index/Save.phpadminhtml_customer_save_after
app/code/Magento/Customer/Model/AccountManagement.phpcustomer_customer_authenticated
app/code/Magento/Customer/Model/AccountManagement.phpcustomer_data_object_login
app/code/Magento/Customer/Model/Address/AbstractAddress.phpcustomer_address_format
app/code/Magento/Customer/Model/Customer.phpcustomer_customer_authenticated
app/code/Magento/Customer/Model/Customer.phpcustomer_validate
app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.phpcustomer_save_after_data_object
app/code/Magento/Customer/Model/Session.phpcustomer_session_init
app/code/Magento/Customer/Model/Session.phpcustomer_login
app/code/Magento/Customer/Model/Session.phpcustomer_data_object_login
app/code/Magento/Customer/Model/Session.phpcustomer_login
app/code/Magento/Customer/Model/Session.phpcustomer_data_object_login
app/code/Magento/Customer/Model/Session.phpcustomer_logout
app/code/Magento/Customer/Model/Visitor.phpvisitor_init
app/code/Magento/Customer/Model/Visitor.phpvisitor_activity_save
app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractMain.phpadminhtml_block_eav_attribute_edit_form_init
app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.phpeav_collection_abstract_load_before
app/code/Magento/GiftMessage/Block/Message/Inline.phpgift_options_prepare_items
app/code/Magento/GroupedProduct/Model/ResourceModel/Product/Indexer/Price/Grouped.phpcatalog_product_prepare_index_select
app/code/Magento/Indexer/Model/Processor/InvalidateCache.phpclean_cache_after_reindex
app/code/Magento/Multishipping/Controller/Checkout/ShippingPost.phpcheckout_controller_multishipping_shipping_post
app/code/Magento/Multishipping/Controller/Checkout/Success.phpmultishipping_checkout_controller_success_action
app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.phpcheckout_type_multishipping_set_shipping_items
app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.phpcheckout_type_multishipping_create_orders_single
app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.phpcheckout_submit_all_after
app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.phpcheckout_multishipping_refund_all
app/code/Magento/PageCache/Model/Cache/Type.phpadminhtml_cache_refresh_type
app/code/Magento/PageCache/Model/Layout/DepersonalizePlugin.phpdepersonalize_clear_session
app/code/Magento/Payment/Block/Form/Cc.phppayment_form_block_to_html_before
app/code/Magento/Payment/Model/Cart.phppayment_cart_collect_items_and_amounts
app/code/Magento/Payment/Model/Method/AbstractMethod.phppayment_method_is_active
app/code/Magento/Payment/Model/Method/Adapter.phppayment_method_is_active
app/code/Magento/Payment/Model/Method/Adapter.phppayment_method_assign_data_
app/code/Magento/Paypal/Controller/Express/AbstractExpress/PlaceOrder.phppaypal_express_place_order_success
app/code/Magento/Persistent/Controller/Index/UnsetCookie.phppersistent_session_expired
app/code/Magento/Persistent/Observer/CheckExpirePersistentQuoteObserver.phppersistent_session_expired
app/code/Magento/Quote/Model/Cart/Totals/ItemConverter.phpitems_additional_data
app/code/Magento/Quote/Model/Quote/Address/ToOrder.phpsales_convert_quote_to_order
app/code/Magento/Quote/Model/Quote/Item.phpsales_quote_item_qty_set_after
app/code/Magento/Quote/Model/Quote/Item.phpsales_quote_item_set_product
app/code/Magento/Quote/Model/Quote/Payment.php_import_data_before
app/code/Magento/Quote/Model/Quote/TotalsCollector.phpsales_quote_collect_totals_before
app/code/Magento/Quote/Model/Quote/TotalsCollector.phpsales_quote_collect_totals_after
app/code/Magento/Quote/Model/Quote/TotalsCollector.phpsales_quote_address_collect_totals_before
app/code/Magento/Quote/Model/Quote/TotalsCollector.phpsales_quote_address_collect_totals_after
app/code/Magento/Quote/Model/Quote.phpsales_quote_remove_item
app/code/Magento/Quote/Model/Quote.phpsales_quote_add_item
app/code/Magento/Quote/Model/Quote.phpsales_quote_product_add_after
app/code/Magento/Quote/Model/Quote.php_merge_before
app/code/Magento/Quote/Model/Quote.php_merge_after
app/code/Magento/Quote/Model/QuoteManagement.phpcheckout_submit_before
app/code/Magento/Quote/Model/QuoteManagement.phpcheckout_submit_all_after
app/code/Magento/Quote/Model/QuoteManagement.phpsales_model_service_quote_submit_before
app/code/Magento/Quote/Model/QuoteManagement.phpsales_model_service_quote_submit_success
app/code/Magento/Quote/Model/QuoteManagement.phpsales_model_service_quote_submit_failure
app/code/Magento/Quote/Model/ResourceModel/Quote/Address/Collection.php_load_after
app/code/Magento/Quote/Model/ResourceModel/Quote/Item/Collection.phpprepare_catalog_product_collection_prices
app/code/Magento/Quote/Model/ResourceModel/Quote/Item/Collection.phpsales_quote_item_collection_products_after_load
app/code/Magento/Reports/Block/Adminhtml/Grid.phpadminhtml_widget_grid_filter_collection
app/code/Magento/Reports/Model/ResourceModel/Order/Collection.phpsales_prepare_amount_expression
app/code/Magento/Review/Controller/Product.phpreview_controller_product_init_before
app/code/Magento/Review/Controller/Product.phpreview_controller_product_init
app/code/Magento/Review/Controller/Product.phpreview_controller_product_init_after
app/code/Magento/Review/Model/ResourceModel/Rating/Collection.phprating_rating_collection_load_before
app/code/Magento/Review/Model/ResourceModel/Review/Collection.phpreview_review_collection_load_before
app/code/Magento/Review/Model/Rss.phprss_catalog_review_collection_select
app/code/Magento/Sales/Block/Adminhtml/Reorder/Renderer/Action.phpadminhtml_customer_orders_add_action_renderer
app/code/Magento/Sales/Controller/Adminhtml/Order/AddressSave.phpadmin_sales_order_address_update
app/code/Magento/Sales/Controller/Adminhtml/Order/Create.phpadminhtml_sales_order_create_process_data_before
app/code/Magento/Sales/Controller/Adminhtml/Order/Create.phpadminhtml_sales_order_create_process_data
app/code/Magento/Sales/Controller/Adminhtml/Order/CreditmemoLoader.phpadminhtml_sales_order_creditmemo_register_before
app/code/Magento/Sales/Model/AdminOrder/Create.phpsales_convert_order_to_quote
app/code/Magento/Sales/Model/AdminOrder/Create.phpsales_convert_order_item_to_quote_item
app/code/Magento/Sales/Model/AdminOrder/Create.phpcheckout_submit_all_after
app/code/Magento/Sales/Model/Config/Backend/Email/AsyncSending.phpsales_email_general_async_sending
app/code/Magento/Sales/Model/Config/Backend/Grid/AsyncIndexing.phpdev_grid_async_indexing
app/code/Magento/Sales/Model/Order/Address/Renderer.phpcustomer_address_format
app/code/Magento/Sales/Model/Order/Email/Sender/CreditmemoCommentSender.phpemail_creditmemo_comment_set_template_vars_before
app/code/Magento/Sales/Model/Order/Email/Sender/CreditmemoSender.phpemail_creditmemo_set_template_vars_before
app/code/Magento/Sales/Model/Order/Email/Sender/InvoiceCommentSender.phpemail_invoice_comment_set_template_vars_before
app/code/Magento/Sales/Model/Order/Email/Sender/InvoiceSender.phpemail_invoice_set_template_vars_before
app/code/Magento/Sales/Model/Order/Email/Sender/OrderCommentSender.phpemail_order_comment_set_template_vars_before
app/code/Magento/Sales/Model/Order/Email/Sender/OrderSender.phpemail_order_set_template_vars_before
app/code/Magento/Sales/Model/Order/Email/Sender/ShipmentCommentSender.phpemail_shipment_comment_set_template_vars_before
app/code/Magento/Sales/Model/Order/Email/Sender/ShipmentSender.phpemail_shipment_set_template_vars_before
app/code/Magento/Sales/Model/Order/Invoice.phpsales_order_invoice_pay
app/code/Magento/Sales/Model/Order/Invoice.phpsales_order_invoice_cancel
app/code/Magento/Sales/Model/Order/Invoice.phpsales_order_invoice_register
app/code/Magento/Sales/Model/Order/Item.phpsales_order_item_cancel
app/code/Magento/Sales/Model/Order/Payment/Operations/CaptureOperation.phpsales_order_payment_capture
app/code/Magento/Sales/Model/Order/Payment/Transaction.php_html_txn_id
app/code/Magento/Sales/Model/Order/Payment.phpsales_order_payment_place_start
app/code/Magento/Sales/Model/Order/Payment.phpsales_order_payment_place_end
app/code/Magento/Sales/Model/Order/Payment.phpsales_order_payment_pay
app/code/Magento/Sales/Model/Order/Payment.phpsales_order_payment_cancel_invoice
app/code/Magento/Sales/Model/Order/Payment.phpsales_order_payment_void
app/code/Magento/Sales/Model/Order/Payment.phpsales_order_payment_refund
app/code/Magento/Sales/Model/Order/Payment.phpsales_order_payment_cancel_creditmemo
app/code/Magento/Sales/Model/Order/Payment.phpsales_order_payment_cancel
app/code/Magento/Sales/Model/Order/Status.phpsales_order_status_unassign
app/code/Magento/Sales/Model/Order.phpsales_order_place_before
app/code/Magento/Sales/Model/Order.phpsales_order_place_after
app/code/Magento/Sales/Model/Order.phporder_cancel_after
app/code/Magento/Sales/Model/ResourceModel/Attribute.php_save_attribute_before
app/code/Magento/Sales/Model/ResourceModel/Attribute.php_save_attribute_after
app/code/Magento/Sales/Model/ResourceModel/Order/Address/Collection.php_load_after
app/code/Magento/Sales/Model/ResourceModel/Order/Collection/AbstractCollection.php_set_sales_order
app/code/Magento/Sales/Model/ResourceModel/Sale/Collection.phpsales_sale_collection_query_before
app/code/Magento/Sales/Model/Rss/NewOrder.phprss_order_new_collection_select
app/code/Magento/Sales/Model/Service/CreditmemoService.phpsales_order_creditmemo_cancel
app/code/Magento/Sales/Model/Service/CreditmemoService.phpsales_order_creditmemo_refund
app/code/Magento/Sales/Model/Service/OrderService.phpsales_order_state_change_before
app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Actions.phpadminhtml_block_salesrule_actions_prepareform
app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Form.phpadminhtml_promo_quote_edit_tab_coupons_form_prepare_form
app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Main.phpadminhtml_promo_quote_edit_tab_main_prepare_form
app/code/Magento/SalesRule/Block/Adminhtml/Promo/Widget/Chooser.phpadminhtml_block_promo_widget_chooser_prepare_collection
app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Save.phpadminhtml_controller_salesrule_prepare_save
app/code/Magento/SalesRule/Model/Quote/Discount.phpsales_quote_address_discount_item
app/code/Magento/SalesRule/Model/Quote/Discount.phpsales_quote_address_discount_item
app/code/Magento/SalesRule/Model/Rule/Condition/Combine.phpsalesrule_rule_condition_combine
app/code/Magento/SalesRule/Model/Rule.phpsalesrule_rule_get_coupon_types
app/code/Magento/SalesRule/Model/RulesApplier.phpsalesrule_validator_process
app/code/Magento/Search/Controller/Adminhtml/Term/Report.phpon_view_report
app/code/Magento/SendFriend/Controller/Product/Send.phpsendfriend_product
app/code/Magento/Store/Model/Address/Renderer.phpstore_address_format
app/code/Magento/Swatches/Controller/Adminhtml/Iframe/Show.phpswatch_gallery_upload_image_after
app/code/Magento/Tax/Controller/Adminhtml/Tax/IgnoreTaxNotification.phpadminhtml_cache_refresh_type
app/code/Magento/Tax/Model/Calculation/Rate.phptax_settings_change_after
app/code/Magento/Tax/Model/Calculation/Rate.phptax_settings_change_after
app/code/Magento/Tax/Model/Calculation/Rate.phptax_settings_change_after
app/code/Magento/Tax/Model/Calculation/Rule.phptax_settings_change_after
app/code/Magento/Tax/Model/Calculation/Rule.phptax_settings_change_after
app/code/Magento/Tax/Model/Calculation.phptax_rate_data_fetch
app/code/Magento/Theme/Block/Html/Topmenu.phppage_block_html_topmenu_gethtml_before
app/code/Magento/Theme/Block/Html/Topmenu.phppage_block_html_topmenu_gethtml_after
app/code/Magento/Theme/Model/Config.phpassign_theme_to_stores_after
app/code/Magento/Theme/Observer/CheckThemeIsAssignedObserver.phpassigned_theme_changed
app/code/Magento/Theme/Setup/InstallData.phptheme_registration_from_filesystem
app/code/Magento/User/Block/Role.phppermissions_role_html_before
app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.phpadmin_permissions_role_prepare_save
app/code/Magento/User/Model/User.phpadmin_user_authenticate_before
app/code/Magento/User/Model/User.phpadmin_user_authenticate_after
app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Options.phpproduct_option_renderer_init
app/code/Magento/Wishlist/Controller/Index/Add.phpwishlist_add_product
app/code/Magento/Wishlist/Controller/Index/Send.phpwishlist_share
app/code/Magento/Wishlist/Controller/Index/UpdateItemOptions.phpwishlist_update_item
app/code/Magento/Wishlist/Helper/Data.phpwishlist_items_renewed
app/code/Magento/Wishlist/Model/ResourceModel/Item/Collection.phpwishlist_item_collection_products_after_load
app/code/Magento/Wishlist/Model/Rss/Wishlist.phprss_wishlist_xml_callback
app/code/Magento/Wishlist/Model/Wishlist.phpwishlist_add_item
app/code/Magento/Wishlist/Model/Wishlist.phpwishlist_product_add_after
lib/internal/Magento/Framework/App/Action/Action.phpcontroller_action_predispatch
lib/internal/Magento/Framework/App/Action/Action.phpcontroller_action_predispatch_
lib/internal/Magento/Framework/App/Action/Action.phpcontroller_action_predispatch_
lib/internal/Magento/Framework/App/Action/Action.phpcontroller_action_postdispatch_
lib/internal/Magento/Framework/App/Action/Action.phpcontroller_action_postdispatch_
lib/internal/Magento/Framework/App/Action/Action.phpcontroller_action_postdispatch
lib/internal/Magento/Framework/App/Cron.phpdefault
lib/internal/Magento/Framework/App/FrontController.phpNO_MATCH
lib/internal/Magento/Framework/App/Http.phpNO_MATCH
lib/internal/Magento/Framework/App/Http.phpcontroller_front_send_response_before
lib/internal/Magento/Framework/App/View.phpcontroller_action_layout_render_before
lib/internal/Magento/Framework/App/View.phpcontroller_action_layout_render_before_
lib/internal/Magento/Framework/Controller/Noroute/Index.phpcontroller_action_noroute
lib/internal/Magento/Framework/Data/AbstractSearchResult.phpabstract_search_result_load_before
lib/internal/Magento/Framework/Data/AbstractSearchResult.php_load_before
lib/internal/Magento/Framework/Data/AbstractSearchResult.phpabstract_search_result_load_after
lib/internal/Magento/Framework/Data/AbstractSearchResult.php_load_after
lib/internal/Magento/Framework/DataObject/Copy.phpNO_MATCH
lib/internal/Magento/Framework/Event/Collection.phpNO_MATCH
lib/internal/Magento/Framework/Event/Manager.phpNO_MATCH
lib/internal/Magento/Framework/Event/Observer/Collection.phpNO_MATCH
lib/internal/Magento/Framework/Event.phpNO_MATCH
lib/internal/Magento/Framework/Locale/Currency.phpcurrency_display_options_forming
lib/internal/Magento/Framework/Message/Manager.phpsession_abstract_clear_messages
lib/internal/Magento/Framework/Message/Manager.phpsession_abstract_add_message
lib/internal/Magento/Framework/Model/AbstractModel.phpmodel_load_before
lib/internal/Magento/Framework/Model/AbstractModel.php_load_before
lib/internal/Magento/Framework/Model/AbstractModel.phpmodel_load_after
lib/internal/Magento/Framework/Model/AbstractModel.php_load_after
lib/internal/Magento/Framework/Model/AbstractModel.phpmodel_save_commit_after
lib/internal/Magento/Framework/Model/AbstractModel.php_save_commit_after
lib/internal/Magento/Framework/Model/AbstractModel.phpmodel_save_before
lib/internal/Magento/Framework/Model/AbstractModel.php_save_before
lib/internal/Magento/Framework/Model/AbstractModel.phpmodel_save_after
lib/internal/Magento/Framework/Model/AbstractModel.phpclean_cache_by_tags
lib/internal/Magento/Framework/Model/AbstractModel.php_save_after
lib/internal/Magento/Framework/Model/AbstractModel.phpmodel_delete_before
lib/internal/Magento/Framework/Model/AbstractModel.php_delete_before
lib/internal/Magento/Framework/Model/AbstractModel.phpmodel_delete_after
lib/internal/Magento/Framework/Model/AbstractModel.phpclean_cache_by_tags
lib/internal/Magento/Framework/Model/AbstractModel.php_delete_after
lib/internal/Magento/Framework/Model/AbstractModel.phpmodel_delete_commit_after
lib/internal/Magento/Framework/Model/AbstractModel.php_delete_commit_after
lib/internal/Magento/Framework/Model/AbstractModel.php_clear
lib/internal/Magento/Framework/Model/ResourceModel/Db/Collection/AbstractCollection.phpcore_collection_abstract_load_before
lib/internal/Magento/Framework/Model/ResourceModel/Db/Collection/AbstractCollection.php_load_before
lib/internal/Magento/Framework/Model/ResourceModel/Db/Collection/AbstractCollection.phpcore_collection_abstract_load_after
lib/internal/Magento/Framework/Model/ResourceModel/Db/Collection/AbstractCollection.php_load_after
lib/internal/Magento/Framework/Model/ResourceModel/Db/VersionControl/RelationComposite.php_process_relation
lib/internal/Magento/Framework/View/Element/AbstractBlock.phpview_block_abstract_to_html_before
lib/internal/Magento/Framework/View/Element/Messages.phpview_message_block_render_grouped_html_after
lib/internal/Magento/Framework/View/Layout/Builder.phplayout_load_before
lib/internal/Magento/Framework/View/Layout/Builder.phplayout_generate_blocks_before
lib/internal/Magento/Framework/View/Layout/Builder.phplayout_generate_blocks_after
lib/internal/Magento/Framework/View/Layout/Generator/Block.phpcore_layout_block_create_after
lib/internal/Magento/Framework/View/Layout.phpcore_layout_render_element
lib/internal/Magento/Framework/View/Result/Layout.phplayout_render_before
lib/internal/Magento/Framework/View/Result/Layout.phplayout_render_before_
Magento 2 Events List and How to Use Them
5 (100%) 3 votes
SHARE
A knowledge craver who always strive to be wiser everyday.

LEAVE A REPLY