Magento 2 Event Cheat Sheet

Oct 4, 2018 3:54:46 PM

Here are dispatched events for Magento 2.2.x.  In order to search easily the event name, please use your browsers search function.

adminhtml_block_eav_attribute_edit_form_init
app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractMain.php

adminhtml_block_html_before
app/code/Magento/Backend/Block/Template.php

adminhtml_block_html_before
app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Carts.php

adminhtml_block_promo_widget_chooser_prepare_collection
app/code/Magento/SalesRule/Block/Adminhtml/Promo/Widget/Chooser.php

adminhtml_block_salesrule_actions_prepareform
app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Actions.php

adminhtml_cache_flush_all
app/code/Magento/Backend/Console/Command/CacheFlushCommand.php

adminhtml_cache_flush_all
app/code/Magento/Backend/Controller/Adminhtml/Cache/FlushAll.php

adminhtml_cache_flush_system
app/code/Magento/Translation/Model/Inline/CacheManager.php

adminhtml_cache_flush_system
app/code/Magento/Backend/Controller/Adminhtml/Cache/FlushSystem.php

adminhtml_cache_flush_system
app/code/Magento/Backend/Console/Command/CacheCleanCommand.php

adminhtml_cache_refresh_type
app/code/Magento/PageCache/Model/Cache/Type.php

adminhtml_cache_refresh_type
app/code/Magento/Tax/Controller/Adminhtml/Tax/IgnoreTaxNotification.php

adminhtml_catalog_category_tree_can_add_root_category
app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php

adminhtml_catalog_category_tree_can_add_sub_category
app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php

adminhtml_catalog_category_tree_is_moveable
app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php

adminhtml_catalog_product_attribute_edit_frontend_prepare_form
app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Front.php

adminhtml_catalog_product_attribute_set_main_html_before
app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main.php

adminhtml_catalog_product_attribute_set_toolbar_main_html_before
app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Toolbar/Main.php

adminhtml_catalog_product_edit_element_types
app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.php

adminhtml_catalog_product_edit_element_types
app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/NewAttribute/Product/Attributes.php

adminhtml_catalog_product_edit_prepare_form
app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.php

adminhtml_catalog_product_edit_prepare_form
app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/NewAttribute/Product/Attributes.php

adminhtml_catalog_product_edit_tab_attributes_create_html_before
app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes/Create.php

adminhtml_catalog_product_form_prepare_excluded_field_list
app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Attributes.php

adminhtml_catalog_product_grid_prepare_massaction
app/code/Magento/Catalog/Block/Adminhtml/Product/Grid.php

adminhtml_cmspage_on_delete
app/code/Magento/Cms/Controller/Adminhtml/Page/Delete.php

adminhtml_cmspage_on_delete
app/code/Magento/Cms/Controller/Adminhtml/Page/Delete.php

adminhtml_controller_catalogrule_prepare_save
app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog/Save.php

adminhtml_controller_salesrule_prepare_save
app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/Save.php

adminhtml_customer_orders_add_action_renderer
app/code/Magento/Sales/Block/Adminhtml/Reorder/Renderer/Action.php

adminhtml_customer_prepare_save
app/code/Magento/Customer/Controller/Adminhtml/Index/Save.php

adminhtml_customer_save_after
app/code/Magento/Customer/Controller/Adminhtml/Index/Save.php

adminhtml_product_attribute_types
app/code/Magento/Catalog/Model/Product/Attribute/Source/Inputtype.php

adminhtml_product_attribute_types
app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Main.php

adminhtml_promo_quote_edit_tab_coupons_form_prepare_form
app/code/Magento/SalesRule/Block/Adminhtml/Promo/Quote/Edit/Tab/Coupons/Form.php

adminhtml_sales_order_create_process_data
pp/code/Magento/Sales/Controller/Adminhtml/Order/Create.php

adminhtml_sales_order_create_process_data_before
app/code/Magento/Sales/Controller/Adminhtml/Order/Create.php

adminhtml_sales_order_create_process_item_after
app/code/Magento/Sales/Controller/Adminhtml/Order/Create.php

adminhtml_sales_order_create_process_item_before
app/code/Magento/Sales/Controller/Adminhtml/Order/Create.php

adminhtml_sales_order_creditmemo_register_before
app/code/Magento/Sales/Controller/Adminhtml/Order/CreditmemoLoader.php

adminhtml_store_edit_form_prepare_form
app/code/Magento/Backend/Block/System/Store/Edit/AbstractForm.php

adminhtml_system_config_advanced_disableoutput_render_before
app/code/Magento/Config/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php

adminhtml_widget_grid_filter_collection
app/code/Magento/Reports/Block/Adminhtml/Grid.php

admin_permissions_role_prepare_save
app/code/Magento/User/Controller/Adminhtml/User/Role/SaveRole.php

admin_sales_order_address_update
app/code/Magento/Sales/Controller/Adminhtml/Order/AddressSave.php

admin_system_config_changed_section_currency
app/code/Magento/CurrencySymbol/Model/System/Currencysymbol.php

admin_system_config_changed_section_currency_before_reinit
app/code/Magento/CurrencySymbol/Model/System/Currencysymbol.php

admin_system_config_changed_section_design
app/code/Magento/Theme/Model/Design/Config/Plugin.php

admin_system_config_changed_section_design
app/code/Magento/Theme/Model/Design/Config/Plugin.php

admin_user_authenticate_after
app/code/Magento/User/Model/User.php

admin_user_authenticate_after
app/code/Magento/User/Model/User.php

admin_user_authenticate_before
app/code/Magento/User/Model/User.php

assigned_theme_changed
app/code/Magento/Theme/Observer/CheckThemeIsAssignedObserver.php

assign_theme_to_stores_after
app/code/Magento/Theme/Model/Config.php

backend_auth_user_login_failed
app/code/Magento/Backend/Model/Auth.php

backend_auth_user_login_failed
app/code/Magento/Backend/Model/Auth.php

backend_auth_user_login_success
app/code/Magento/Backend/Model/Auth.php

backend_block_widget_grid_prepare_grid_before
app/code/Magento/Backend/Block/Widget/Grid.php

catalogrule_dirty_notice
app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog/Index.php

catalogsearch_reset_search_result
app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext.php

catalog_block_product_list_collection
app/code/Magento/Catalog/Block/Product/ListProduct.php

catalog_block_product_status_display
app/code/Magento/Catalog/Block/Product/AbstractProduct.php

catalog_category_change_products
app/code/Magento/Catalog/Model/ResourceModel/Category.php

catalog_category_delete_after_done
app/code/Magento/Catalog/Model/ResourceModel/Category.php

catalog_category_flat_loadnodes_before
app/code/Magento/Catalog/Model/ResourceModel/Category/Flat.php

catalog_category_prepare_save
app/code/Magento/Catalog/Controller/Adminhtml/Category/Save.php

catalog_category_tree_init_inactive_category_ids
app/code/Magento/Catalog/Model/ResourceModel/Category/Tree.php

catalog_category_tree_init_inactive_category_ids
app/code/Magento/Catalog/Model/ResourceModel/Category/Flat.php

catalog_controller_category_delete
app/code/Magento/Catalog/Controller/Adminhtml/Category/Delete.php

catalog_controller_category_init_after
app/code/Magento/Catalog/Controller/Category/View.php

catalog_controller_product_init_after
app/code/Magento/Catalog/Helper/Product.php

catalog_controller_product_init_before
app/code/Magento/Catalog/Helper/Product.php

catalog_controller_product_view
app/code/Magento/Catalog/Helper/Product/View.php

catalog_prepare_price_select
app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php

catalog_product_attribute_update_before
app/code/Magento/Catalog/Model/Product/Action.php

catalog_product_collection_apply_limitations_after
app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php

catalog_product_collection_before_add_count_to_categories
app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php

catalog_product_collection_load_after
app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php

catalog_product_compare_add_product
app/code/Magento/Catalog/Controller/Product/Compare/Add.php

catalog_product_compare_item_collection_clear
app/code/Magento/Catalog/Model/ResourceModel/Product/Compare/Item/Collection.php

catalog_product_compare_remove_product
app/code/Magento/Catalog/Controller/Product/Compare/Remove.php

catalog_product_delete_after_done
app/code/Magento/Catalog/Model/ResourceModel/Product.php

catalog_product_edit_action
app/code/Magento/Catalog/Controller/Adminhtml/Product/Edit.php

catalog_product_gallery_prepare_layout
app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php

catalog_product_gallery_upload_image_after
app/code/Magento/Catalog/Controller/Adminhtml/Product/Gallery/Upload.php

catalog_product_get_final_price
app/code/Magento/Catalog/Model/Product/Type/Price.php

catalog_product_get_final_price
app/code/Magento/Bundle/Pricing/Price/BundleSelectionPrice.php

catalog_product_get_final_price
app/code/Magento/Bundle/Model/Product/Price.php

catalog_product_get_final_price
app/code/Magento/Bundle/Model/Product/Price.php

catalog_product_import_bunch_delete_after
app/code/Magento/CatalogImportExport/Model/Import/Product.php

catalog_product_import_bunch_delete_commit_before
app/code/Magento/CatalogImportExport/Model/Import/Product.php

catalog_product_import_bunch_save_after
app/code/Magento/CatalogImportExport/Model/Import/Product.php

catalog_product_import_finish_before
app/code/Magento/CatalogImportExport/Model/Import/Product.php

catalog_product_is_salable_after
app/code/Magento/Catalog/Model/Product.php

catalog_product_is_salable_before
app/code/Magento/Catalog/Model/Product.php

catalog_product_new_action
app/code/Magento/Catalog/Controller/Adminhtml/Product/NewAction.php

catalog_product_option_price_configuration_after
app/code/Magento/Catalog/Block/Product/View/Options.php

catalog_product_option_price_configuration_after
app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.php

catalog_product_prepare_index_select
app/code/Magento/Bundle/Model/ResourceModel/Indexer/Price.php

catalog_product_prepare_index_select
app/code/Magento/GroupedProduct/Model/ResourceModel/Product/Indexer/Price/Grouped.php

catalog_product_to_website_change
app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute/Save.php

catalog_product_upsell
app/code/Magento/Catalog/Block/Product/ProductList/Upsell.php

catalog_product_validate_variations_before
app/code/Magento/ConfigurableProduct/Model/Product/Validator/Plugin.php

catalog_product_view_config
app/code/Magento/Catalog/Block/Product/View.php

category_move
app/code/Magento/Catalog/Model/Category.php

category_prepare_ajax_response
app/code/Magento/Catalog/Controller/Adminhtml/Category.php

catelogsearch_searchable_attributes_load_after
app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/DataProvider.php

checkout_allow_guest
app/code/Magento/Checkout/Helper/Data.php

checkout_cart_add_product_complete
app/code/Magento/Checkout/Controller/Cart/Add.php

checkout_cart_product_add_after
app/code/Magento/Checkout/Model/Cart.php

checkout_cart_product_update_after
app/code/Magento/Checkout/Model/Cart.php

checkout_cart_save_after
pp/code/Magento/Checkout/Model/Cart.php

checkout_cart_save_before
app/code/Magento/Checkout/Model/Cart.php

checkout_cart_update_items_after
app/code/Magento/Checkout/Model/Cart.php

checkout_cart_update_items_before
app/code/Magento/Checkout/Model/Cart.php

checkout_cart_update_item_complete
app/code/Magento/Checkout/Controller/Cart/UpdateItemOptions.php

checkout_controller_multishipping_shipping_post
app/code/Magento/Multishipping/Controller/Checkout/ShippingPost.php

checkout_controller_onepage_saveOrder
app/code/Magento/Checkout/Controller/Onepage/SaveOrder.php

checkout_directpost_placeOrder
app/code/Magento/Authorizenet/Controller/Directpost/Payment/Place.php

checkout_multishipping_refund_all
app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php

checkout_onepage_controller_success_action
app/code/Magento/Checkout/Controller/Onepage/Success.php

checkout_quote_destroy
app/code/Magento/Checkout/Model/Session.php

checkout_quote_init
app/code/Magento/Checkout/Model/Session.php

checkout_submit_all_after
app/code/Magento/Checkout/Model/Type/Onepage.php

checkout_submit_all_after
app/code/Magento/Sales/Model/AdminOrder/Create.php

checkout_submit_all_after
app/code/Magento/Quote/Model/QuoteManagement.php

checkout_submit_all_after
app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php

checkout_submit_before
app/code/Magento/Quote/Model/QuoteManagement.php

checkout_type_multishipping_create_orders_single
app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php

checkout_type_multishipping_set_shipping_items
app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php

checkout_type_onepage_save_order_after
app/code/Magento/Checkout/Model/Type/Onepage.php

clean_cache_after_reindex
app/code/Magento/Indexer/Model/Processor/CleanCache.php

clean_cache_by_tags
app/code/Magento/Catalog/Plugin/Model/Product/Action/UpdateAttributesFlushCache.php

clean_cache_by_tags
app/code/Magento/Catalog/Model/Category.php

clean_cache_by_tags
app/code/Magento/Catalog/Model/Indexer/Product/Category/Action/Rows.php

clean_cache_by_tags
app/code/Magento/CatalogRule/Model/Indexer/AbstractIndexer.php

clean_cache_by_tags
clean_cache_by_tags

clean_cache_by_tags
app/code/Magento/Indexer/Model/Processor/CleanCache.php

clean_cache_by_tags
app/code/Magento/Catalog/Plugin/Model/Product/Action/UpdateAttributesFlushCache.php

clean_catalog_images_cache_after
app/code/Magento/Backend/Controller/Adminhtml/Cache/CleanImages.php

clean_media_cache_after
app/code/Magento/Backend/Controller/Adminhtml/Cache/CleanMedia.php

clean_static_files_cache_after
app/code/Magento/Backend/Controller/Adminhtml/Cache/CleanStaticFiles.php

cms_controller_router_match_before
app/code/Magento/Cms/Controller/Router.php

cms_page_prepare_save
app/code/Magento/Cms/Controller/Adminhtml/Page/Save.php

cms_page_render
app/code/Magento/Cms/Helper/Page.php

cms_wysiwyg_images_static_urls_allowed
app/code/Magento/Cms/Helper/Wysiwyg/Images.php

controller_action_catalog_product_save_entity_after
app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php

controller_action_nocookies
app/code/Magento/Cookie/Controller/Index/NoCookies.php

customer_account_edited
app/code/Magento/Customer/Controller/Account/EditPost.php

customer_address_format
app/code/Magento/Sales/Model/Order/Address/Renderer.php

customer_address_format
app/code/Magento/Customer/Model/Address/AbstractAddress.php

customer_customer_authenticated
app/code/Magento/Customer/Model/Customer.php

customer_customer_authenticated
app/code/Magento/Customer/Model/AccountManagement.php

customer_data_object_login
app/code/Magento/Customer/Model/AccountManagement.php

customer_data_object_login
app/code/Magento/Customer/Model/Session.php

customer_data_object_login
app/code/Magento/Customer/Model/Session.php

customer_login
app/code/Magento/Customer/Model/Session.php

customer_login
app/code/Magento/Customer/Model/Session.php

customer_logout
app/code/Magento/Customer/Model/Session.php

customer_register_success
app/code/Magento/Customer/Controller/Account/CreatePost.php

customer_save_after_data_object
app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php

customer_session_init
app/code/Magento/Customer/Model/Session.php

custom_quote_process
app/code/Magento/Checkout/Model/Session.php

depersonalize_clear_session
app/code/Magento/PageCache/Model/Layout/DepersonalizePlugin.php

eav_collection_abstract_load_before
app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php

email_creditmemo_comment_set_template_vars_before
app/code/Magento/Sales/Model/Order/Email/Sender/CreditmemoCommentSender.php

email_creditmemo_set_template_vars_before
app/code/Magento/Sales/Model/Order/Email/Sender/CreditmemoSender.php

email_creditmemo_set_template_vars_before
app/code/Magento/Sales/Model/Order/Creditmemo/Sender/EmailSender.php

email_invoice_comment_set_template_vars_before
app/code/Magento/Sales/Model/Order/Email/Sender/InvoiceCommentSender.php

email_invoice_set_template_vars_before
app/code/Magento/Sales/Model/Order/Invoice/Sender/EmailSender.php

email_invoice_set_template_vars_before
app/code/Magento/Sales/Model/Order/Email/Sender/InvoiceSender.php

email_order_comment_set_template_vars_before
app/code/Magento/Sales/Model/Order/Email/Sender/OrderCommentSender.php

email_order_set_template_vars_before
app/code/Magento/Sales/Model/Order/Email/Sender/OrderSender.php

email_shipment_comment_set_template_vars_before
app/code/Magento/Sales/Model/Order/Email/Sender/ShipmentCommentSender.php

email_shipment_set_template_vars_before
app/code/Magento/Sales/Model/Order/Shipment/Sender/EmailSender.php

email_shipment_set_template_vars_before
app/code/Magento/Sales/Model/Order/Email/Sender/ShipmentSender.php

gift_options_prepare_items
app/code/Magento/GiftMessage/Block/Message/Inline.php

items_additional_data
app/code/Magento/Quote/Model/Cart/Totals/ItemConverter.php

load_customer_quote_before
app/code/Magento/Checkout/Model/Session.php

multishipping_checkout_controller_success_action
app/code/Magento/Multishipping/Controller/Checkout/Success.php

NO_MATCH
app/code/Magento/Backend/Controller/Adminhtml/System/Store/Save.php

NO_MATCH
app/code/Magento/Catalog/Model/Product/Type/AbstractType.php

NO_MATCH
app/code/Magento/Config/Model/Config.php

on_view_report
app/code/Magento/Search/Controller/Adminhtml/Term/Report.php

order_cancel_after
app/code/Magento/Sales/Model/Order.php

page_block_html_topmenu_gethtml_after
app/code/Magento/Theme/Block/Html/Topmenu.php

page_block_html_topmenu_gethtml_before
app/code/Magento/Theme/Block/Html/Topmenu.php

payment_cart_collect_items_and_amounts
app/code/Magento/Payment/Model/Cart.php

payment_form_block_to_html_before
app/code/Magento/Payment/Block/Form/Cc.php

payment_method_assign_data
app/code/Magento/Paypal/Model/Payflowpro.php

payment_method_assign_data
app/code/Magento/Payment/Model/Method/Adapter.php

payment_method_assign_data
app/code/Magento/Payment/Model/Method/AbstractMethod.php

payment_method_assign_data_
app/code/Magento/Payment/Model/Method/Adapter.php

payment_method_assign_data_
app/code/Magento/Payment/Model/Method/AbstractMethod.php

payment_method_assign_data_
app/code/Magento/Paypal/Model/Payflowpro.php

payment_method_assign_data_vault
app/code/Magento/Vault/Model/Method/Vault.php

payment_method_assign_data_vault_
app/code/Magento/Vault/Model/Method/Vault.php

payment_method_is_active
app/code/Magento/Payment/Model/Method/AbstractMethod.php

payment_method_is_active
app/code/Magento/Payment/Model/Method/Adapter.php

paypal_express_place_order_success
app/code/Magento/Paypal/Controller/Express/AbstractExpress/PlaceOrder.php

permissions_role_html_before
app/code/Magento/User/Block/Role.php

persistent_session_expired
app/code/Magento/Persistent/Observer/CheckExpirePersistentQuoteObserver.php

persistent_session_expired
app/code/Magento/Persistent/Controller/Index/UnsetCookie.php

prepare_catalog_product_collection_prices
app/code/Magento/Quote/Model/ResourceModel/Quote/Item/Collection.php

prepare_catalog_product_collection_prices
app/code/Magento/Bundle/Model/Product/Price.php

prepare_catalog_product_index_select
app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Eav/Source.php

prepare_catalog_product_index_select
app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Eav/Source.php

prepare_catalog_product_index_select
app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/DefaultPrice.php

prepare_catalog_product_index_select
app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Eav/AbstractEav.php

prepare_catalog_product_index_select
app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Eav/Decimal.php

product_attribute_form_build
app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Advanced.php

product_attribute_form_build_front_tab
app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Front.php

product_attribute_form_build_main_tab
app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Edit/Tab/Main.php

product_attribute_grid_build
app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Grid.php

product_option_renderer_init
app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Options.php

rating_rating_collection_load_before
app/code/Magento/Review/Model/ResourceModel/Rating/Collection.php

restore_quote
app/code/Magento/Checkout/Model/Session.php

review_controller_product_init
app/code/Magento/Review/Controller/Product.php

review_controller_product_init_after
app/code/Magento/Review/Controller/Product.php

review_controller_product_init_before
app/code/Magento/Review/Controller/Product.php

review_review_collection_load_before
pp/code/Magento/Review/Model/ResourceModel/Review/Collection.php

rss_catalog_category_xml_callback
app/code/Magento/Catalog/Block/Rss/Category.php

rss_catalog_new_xml_callback
app/code/Magento/Catalog/Block/Rss/Product/NewProducts.php

rss_catalog_notify_stock_collection_select
app/code/Magento/Catalog/Model/Rss/Product/NotifyStock.php

rss_catalog_review_collection_select
app/code/Magento/Review/Model/Rss.php

rss_catalog_special_xml_callback
app/code/Magento/Catalog/Block/Rss/Product/Special.php

rss_order_new_collection_select
app/code/Magento/Sales/Model/Rss/NewOrder.php

rss_wishlist_xml_callback
app/code/Magento/Wishlist/Model/Rss/Wishlist.php

salesrule_rule_condition_combine
app/code/Magento/SalesRule/Model/Rule/Condition/Combine.php

salesrule_rule_get_coupon_types
app/code/Magento/SalesRule/Model/Rule.php

salesrule_validator_process
app/code/Magento/SalesRule/Model/RulesApplier.php

sales_convert_order_item_to_quote_item
app/code/Magento/Sales/Model/AdminOrder/Create.php

sales_convert_order_to_quote
app/code/Magento/Sales/Model/AdminOrder/Create.php

sales_convert_quote_to_order
pp/code/Magento/Quote/Model/Quote/Address/ToOrder.php

sales_model_service_quote_submit_before
app/code/Magento/Quote/Model/QuoteManagement.php

sales_model_service_quote_submit_failure
app/code/Magento/Quote/Model/QuoteManagement.php

sales_model_service_quote_submit_success
app/code/Magento/Quote/Model/QuoteManagement.php

sales_order_creditmemo_cancel
app/code/Magento/Sales/Model/Service/CreditmemoService.php

sales_order_creditmemo_refund
app/code/Magento/Sales/Model/Order/Creditmemo/RefundOperation.php

sales_order_invoice_cancel
pp/code/Magento/Sales/Model/Order/Invoice.php

sales_order_invoice_pay
app/code/Magento/Sales/Model/Order/Invoice.php

sales_order_invoice_register
app/code/Magento/Sales/Model/Order/Invoice.php

sales_order_invoice_register
app/code/Magento/Sales/Model/Order/Invoice/PayOperation.php

sales_order_item_cancel
app/code/Magento/Sales/Model/Order/Item.php

sales_order_payment_cancel
app/code/Magento/Sales/Model/Order/Payment.php

sales_order_payment_cancel_creditmemo
app/code/Magento/Sales/Model/Order/Payment.php

sales_order_payment_cancel_invoice
app/code/Magento/Sales/Model/Order/Payment.php

sales_order_payment_capture
app/code/Magento/Sales/Model/Order/Payment/Operations/CaptureOperation.php

sales_order_payment_pay
app/code/Magento/Sales/Model/Order/Payment.php

sales_order_payment_place_end
app/code/Magento/Sales/Model/Order/Payment.php

sales_order_payment_place_start
app/code/Magento/Sales/Model/Order/Payment.php

sales_order_payment_refund
app/code/Magento/Sales/Model/Order/Payment.php

sales_order_payment_void
app/code/Magento/Sales/Model/Order/Payment.php

sales_order_place_after
app/code/Magento/Sales/Model/Order.php

sales_order_place_before
app/code/Magento/Sales/Model/Order.php

sales_order_state_change_before
app/code/Magento/Sales/Model/Service/OrderService.php

sales_order_status_unassign
app/code/Magento/Sales/Model/Order/Status.php

sales_prepare_amount_expression
app/code/Magento/Reports/Model/ResourceModel/Order/Collection.php

sales_quote_address_collect_totals_after
app/code/Magento/Quote/Model/Quote/TotalsCollector.php

sales_quote_address_collect_totals_before
app/code/Magento/Quote/Model/Quote/TotalsCollector.php

sales_quote_address_discount_item
app/code/Magento/SalesRule/Model/Quote/Discount.php

sales_quote_address_discount_item
app/code/Magento/SalesRule/Model/Quote/Discount.php

sales_quote_add_item
app/code/Magento/Quote/Model/Quote.php

sales_quote_collect_totals_after
app/code/Magento/Quote/Model/Quote/TotalsCollector.php

sales_quote_collect_totals_before
app/code/Magento/Quote/Model/Quote/TotalsCollector.php

sales_quote_item_collection_products_after_load
app/code/Magento/Quote/Model/ResourceModel/Quote/Item/Collection.php

sales_quote_item_qty_set_after
app/code/Magento/Quote/Model/Quote/Item.php

sales_quote_item_set_product
app/code/Magento/Quote/Model/Quote/Item.php

sales_quote_product_add_after
app/code/Magento/Quote/Model/Quote.php

sales_quote_remove_item
app/code/Magento/Quote/Model/Quote.php

sales_sale_collection_query_before
app/code/Magento/Sales/Model/ResourceModel/Sale/Collection.php

sendfriend_product
app/code/Magento/SendFriend/Controller/Product/Send.php

shortcut_buttons_container
app/code/Magento/Catalog/Block/ShortcutButtons.php

shortcut_buttons_container
app/code/Magento/Checkout/Block/QuoteShortcutButtons.php

store_add
app/code/Magento/Store/Model/Config/Importer/Processor/Create.php

store_address_format
app/code/Magento/Store/Model/Address/Renderer.php

store_delete
app/code/Magento/Backend/Controller/Adminhtml/System/Store/DeleteStorePost.php

store_delete
app/code/Magento/Store/Model/Config/Importer/Processor/Delete.php

store_edit
app/code/Magento/Store/Model/Config/Importer/Processor/Update.php

store_group_save
app/code/Magento/Backend/Controller/Adminhtml/System/Store/Save.php

store_group_save
pp/code/Magento/Store/Model/Config/Importer/Processor/Update.php

store_group_save
app/code/Magento/Store/Model/Config/Importer/Processor/Create.php

swatch_gallery_upload_image_after
app/code/Magento/Swatches/Controller/Adminhtml/Iframe/Show.php

tax_rate_data_fetch
app/code/Magento/Tax/Model/Calculation.php

tax_settings_change_after
app/code/Magento/Tax/Model/Calculation/Rate.php

tax_settings_change_after
app/code/Magento/Tax/Model/Calculation/Rate.php

tax_settings_change_after
app/code/Magento/Tax/Model/Calculation/Rule.php

tax_settings_change_after
app/code/Magento/Tax/Model/Calculation/Rule.php

tax_settings_change_after
app/code/Magento/Tax/Model/Calculation/Rate.php

theme_save_after
app/code/Magento/Backend/Controller/Adminhtml/System/Design/Save.php

visitor_activity_save
app/code/Magento/Customer/Model/Visitor.php

visitor_init
app/code/Magento/Customer/Model/Visitor.php

wishlist_add_item
app/code/Magento/Wishlist/Model/Wishlist.php

wishlist_add_product
app/code/Magento/Wishlist/Controller/Index/Add.php

wishlist_items_renewed
app/code/Magento/Wishlist/Helper/Data.php

wishlist_item_collection_products_after_load
app/code/Magento/Wishlist/Model/ResourceModel/Item/Collection.php

wishlist_product_add_after
app/code/Magento/Wishlist/Model/Wishlist.php

wishlist_share
app/code/Magento/Wishlist/Controller/Index/Send.php

wishlist_update_item
app/code/Magento/Wishlist/Controller/Index/UpdateItemOptions.php

_add_is_active_filter
app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php

_add_is_active_filter
app/code/Magento/Catalog/Model/ResourceModel/Category/Flat/Collection.php

_dev_grid_async_indexing_
app/code/Magento/Sales/Model/Config/Backend/Grid/AsyncIndexing.php

_html_txn_id
pp/code/Magento/Sales/Model/Order/Payment/Transaction.php

_import_data_before
app/code/Magento/Quote/Model/Quote/Payment.php

_load_after
app/code/Magento/Catalog/Model/ResourceModel/Category/Flat/Collection.php

_load_after
_load_after

_load_after
app/code/Magento/Quote/Model/ResourceModel/Quote/Address/Collection.php

_load_after
app/code/Magento/Sales/Model/ResourceModel/Order/Address/Collection.php

_load_before
app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php

_merge_after
app/code/Magento/Quote/Model/Quote.php

_merge_before
app/code/Magento/Quote/Model/Quote.php

_move_after
app/code/Magento/Catalog/Model/Category.php

_move_before
app/code/Magento/Catalog/Model/Category.php

_sales_email_general_async_sending_
app/code/Magento/Sales/Model/Config/Backend/Email/AsyncSending.php

_save_attribute_after
app/code/Magento/Sales/Model/ResourceModel/Attribute.php

_save_attribute_before
app/code/Magento/Sales/Model/ResourceModel/Attribute.php

_set_sales_order
app/code/Magento/Sales/Model/ResourceModel/Order/Collection/AbstractCollection.php

_validate_after
app/code/Magento/Catalog/Model/Product.php

_validate_before
app/code/Magento/Catalog/Model/Product.php

You are using the Polacin Mastercard Payment Gateway Services (MPGS) for Magento 2 or Magento 1, please see the guide below:

Requirements: Merchant ID, Merchant Name (only apply to Hosted Checkout), API Password, Gateway URL.

- Gateway URL: https://GATEWAY-DOMAIN, for example Your Merchant Administration URL is https://ap-gateway.mastercard.com/ma/login.s, You will put https://ap-gateway.mastercard.com

- API Password is not the password in order to log into your Merchant Administration, API Password is formated like 9c94b8edfefdb45adfcf4a2fd880d6e1.

How to get API Password

Log into your Merchant Administation: Admin > Integration Settings

API Password is Password 1 field

- Navigation: REST API Keys

- Create Publishable API Key

- Create Secret API Key

This instruction is for Secure Acceptance integration

Login to Cybersource Business Center to create a Profile

When you are done, it looks like below screenshot

Copy this Profile ID to put in Profile ID field in Configuration Section from Magento Backend

Payment Settings

Choose Credit Cards

Choose Currencies

Security

Create New Key > Generate. You will get Access Key and Secret Key. These will be used in Configuration section from Magento backend

A full theme package you buy from marketplace it commonly included: SQL file, Theme

When you install a Magento 2 by importing database from SQL file, you may get the problem related payment method.

That's your website redirected (Status 302) to Cart page after Place Order instead of Success page. i experienced with Smartwave, Plazetheme ...

How to fix this problem:

- Clear your cache by manually deleting the content of /var/cache/ folder , the /var/page-cache/ folder.

- Remove /var/generation/

- Remove /generated/ if you are using Magento 2.2.0

- Reindex your website by using the SSH command line php bin/magento indexer:reindex

- Deploy again the theme by ysubg the SSH command line php bin/magento setup:static-content:deploy

In case you already did all the steps above but the problem is still not resolved, you can use command line composer update to fixed your core Magento 2

Here is an example of how to upgrade magento 2.1.0 to 2.1.5

You can use following steps with composer update:

composer require magento/product-community-edition 2.1.5 --no-update
composer update
rm -rf var/di var/generation
php bin/magento cache:flush
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento indexer:reindex
chmod -R 777 var

After upgrade, check your Magento version with the following command:

php bin/magento --version

How to get IPAddress in Magento 2

Jul 20, 2016 11:44:18 AM

Here is a simple way to get IP Address in Magento 2

protected function getIpAddress()
    {
        $om = \Magento\Framework\App\ObjectManager::getInstance();
        $obj = $om->get('Magento\Framework\HTTP\PhpEnvironment\RemoteAddress');
        $ip =  $obj->getRemoteAddress();
        return $ip;
    }

How to Install a Magento 2 on localhost

Jul 5, 2016 11:21:41 PM

So many people as beginners of Magento 2 often get problem with Magento 2 installation and Command Line. Today i will share my experience in this job.

I suppose the project named: magento-2.1.0 (relative path looks like xampp/htdocs/magento-2.1.0/)

You install this project follow magento's guide http://devdocs.magento.com/guides/v2.0/install-gde/bk-install-guide.html

I just want to instruct the way to use the Command Line.

After you completed Magento 2 Installation, you need to run some command:

- Open Xampp as below screenshot

Of course we have a few ways to run command line but this is my favorite way

Then type:

cd htdocs\magento-2.1.0\bin [Enter]

php magento setup:static-content:deploy [Enter]

php magento indexer:reindex [Enter]

Done!! Your Magento 2 installation completed

If you want to install the extensions for this project, you just need type command:

php magento setup:upgrade [Enter]

php magento static-content:deploy [Enter] ( this command applys to extension including js, css, html files in web directory)

 

Event and Observer in Magento 2

Jun 15, 2016 9:21:34 PM

 we have to declare event that we will catch in file di.xml and a function on Observer file.

Example: echo module name, controller name, action name of the current module.

Event used:  controller_action_predispatch

1. Declare Event in events.xml (frontend)

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd">
<event name="controller_action_predispatch">
<observer name="magenhub_event" instance="Magenhub\Chris\Model\Observer" method="printInfo" shared="false" />
</event>
</config>

This code will be write in module: Magenhub_Chris, model Observer.

2. Write file Observer.php

Write function printInfo to print module name, controller name, action name of the current url.

File: app/code/Magenhub/Chris/Model/Observer.php

<?php

namespace Magenhub\Chris\Model;

class Observer {

public function printInfo(\Magento\Framework\Event\Observer $observer) {
$request = $observer->getEvent()->getData('request');
echo $request->getModuleName('catalog').'<br/>';
echo $request->getControllerName('product').'<br/>';
echo $request->getActionName('view').'<br/>';
die();
}

}
 

This code only print module name, controller name and action name to browser.

  • Result for home page:

cms
index
index

  • Result for product view page:

catalog
product
view

 


It's a Helper

use Magento\Framework\App\Helper\AbstractHelper;
use Magento\Framework\App\Filesystem\DirectoryList;

class Resize extends AbstractHelper{

    protected $_filesystem;
    protected $_storeManager;
    protected $_directory;
    protected $_imageFactory;

    public function __construct(
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        \Magento\Framework\Filesystem $filesystem,
        \Magento\Framework\Image\AdapterFactory $imageFactory

    ) {
        $this->_filesystem = $filesystem;
        $this->_storeManager = $storeManager;
        $this->_directory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA);
        $this->_imageFactory = $imageFactory;

    }


    public function imageResize(
	$src,
	$width=200,
	$height=200,
	$dir='pl/custommodule/images/'
	){
        $absPath = $this->_filesystem
		->getDirectoryRead(DirectoryList::MEDIA)
		->getAbsolutePath().$src;

        $imageResized = $this->_filesystem
		->getDirectoryRead(DirectoryList::MEDIA)
		->getAbsolutePath($dir).
		$this->getNewDirectoryImage($src);
        $imageResize = $this->_imageFactory->create();

        $imageResize->open($absPath);
        $imageResize->backgroundColor([255, 255, 255]);
        $imageResize->constrainOnly(TRUE);
        $imageResize->keepTransparency(TRUE);
        $imageResize->keepFrame(true);
        $imageResize->keepAspectRatio(true);

        $imageResize->resize($width,$height);
        $dest = $imageResized ;
        $imageResize->save($dest);
        $resizedURL= $this->_storeManager->getStore()
		->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA).
		$dir.$this->getNewDirectoryImage($src);
        return $resizedURL;

    }

    public function getNewDirectoryImage($src){
        $segments = array_reverse(explode('/',$src));
        $first_dir = substr($segments[0],0,1);
        $second_dir = substr($segments[0],1,1);
        return 'cache/'.$first_dir.'/'.$second_dir.'/'.$segments[0];
    }
}
Page:
  1. 1
  2. 2