Complete Events List for Magento Community 1.4.1.0

11 October, 2010, Filed under Developing in Magento

This is the second iteration of the Magento events list, updated to include some items that my former script didn’t pick up, as well as to add the new events from the Magento 1.4.1.0 upgrade. If you want a little more detail about the events, I’ve uploaded the raw data for both events and event types to help you dig out the right event yourself.

Generic Controller Routing Events

When hooking events, your best best is often to attach to a particular page action. These generic routing events are triggered for every page action. Some controllers (such as the review and checkout controllers) fire additional events, so check the full event list below or the data files at the head of the post for more details.


controller_action_layout_load_before
controller_action_layout_generate_xml_before
controller_action_layout_generate_blocks_before
controller_action_layout_generate_blocks_after
controller_action_layout_render_before
'controller_action_layout_render_before_'.$this->getFullActionName()
controller_action_predispatch
'controller_action_predispatch_'.$this->getRequest()->getRouteName()
'controller_action_predispatch_'.$this->getFullActionName()
'controller_action_postdispatch_'.$this->getFullActionName()
'controller_action_postdispatch_'.$this->getRequest()->getRouteName()
controller_action_postdispatch
controller_action_noroute
controller_action_nocookies
controller_front_init_before
controller_front_init_routers
controller_front_send_response_after

Generic Object Saving Events

The next best bet is often to grab an object as it is saved/loaded/etc. Since most objects in Magento extend Mage_Core_Model_Abstract, they inherit a common set of events. Notice that there are two variants of the events, one based on the $_eventPrefix of the object, and another more generic one. Keep in mind that the generic variations of these events are fired with the same name for all of the major core models, so don’t depend on them to retrieve a specific class.


$this->_eventPrefix.'_delete_after'
$this->_eventPrefix.'_delete_before'
$this->_eventPrefix.'_delete_commit_after'
$this->_eventPrefix.'_load_after'
$this->_eventPrefix.'_load_before'
$this->_eventPrefix.'_save_after'
$this->_eventPrefix.'_save_before'
$this->_eventPrefix.'_save_commit_after'

model_delete_after
model_delete_before
model_delete_commit_after
model_load_after
model_load_before
model_save_after
model_save_before
model_save_commit_after

These events are fired based on the $_eventType set for each of the Magento core objects, which currently include the following. Replace the reference to $_eventType with one of the codes below to get the full event name:


admin_roles
admin_user
catalog_category
catalog_category_collection
catalog_compare_item
catalog_entity_attribute
cataloginventory_stock_item
catalog_product
catalogrule_rule
cms_page
core_abstract
core_config_data
customer
customer_address
customer_entity_attribute
customer_group
eav_entity_attribute
eav_form_element
eav_form_fieldset
eav_form_type
giftregisty_gift
newsletter_subscriber
review
sales_creditmemo_item
sales_invoice_item
sales_order
sales_order_address
sales_order_address_collection
sales_order_address_resource
sales_order_collection
sales_order_creditmemo
sales_order_creditmemo_collection
sales_order_creditmemo_comment_collection
sales_order_creditmemo_comment_resource
sales_order_creditmemo_grid_collection
sales_order_creditmemo_item_collection
sales_order_creditmemo_item_resource
sales_order_creditmemo_resource
sales_order_grid_collection
sales_order_invoice
sales_order_invoice_collection
sales_order_invoice_comment_collection
sales_order_invoice_comment_resource
sales_order_invoice_grid_collection
sales_order_invoice_item_collection
sales_order_invoice_item_resource
sales_order_invoice_resource
sales_order_item
sales_order_item_collection
sales_order_item_resource
sales_order_payment
sales_order_payment_collection
sales_order_payment_resource
sales_order_payment_transaction
sales_order_resource
sales_order_shipment
sales_order_shipment_collection
sales_order_shipment_comment_collection
sales_order_shipment_comment_resource
sales_order_shipment_grid_collection
sales_order_shipment_item_collection
sales_order_shipment_item_resource
sales_order_shipment_resource
sales_order_shipment_track
sales_order_shipment_track_collection
sales_order_shipment_track_resource
sales_order_status_history
sales_order_status_history_collection
sales_order_status_history_resource
sales_quote
sales_quote_address
sales_quote_item
sales_quote_payment
sales_recurring_profile_collection
sales_resource
salesrule_rule
sales_shipment_item
store
store_group
tag
website
wishlist_item

The Laundry List (All of the Other Events)

And, for the truly courageous, the entire event list for Magento 1.4.1.0. If you want to use this for more than just reference, see the head of the post for a download with the file and line information for these events.


adminhtml_block_eav_attribute_edit_form_init
adminhtml_block_html_before
adminhtml_block_salesrule_actions_prepareform
adminhtml_catalog_category_tabs
adminhtml_catalog_category_tree_can_add_root_category
adminhtml_catalog_category_tree_can_add_sub_category
adminhtml_catalog_category_tree_is_moveable
adminhtml_catalog_product_attribute_set_main_html_before
adminhtml_catalog_product_attribute_set_toolbar_main_html_before
adminhtml_catalog_product_edit_element_types
adminhtml_catalog_product_edit_prepare_form
adminhtml_catalog_product_edit_tab_attributes_create_html_before
adminhtml_catalog_product_form_prepare_excluded_field_list
adminhtml_cms_page_edit_tab_content_prepare_form
adminhtml_cms_page_edit_tab_design_prepare_form
adminhtml_cms_page_edit_tab_main_prepare_form
adminhtml_cms_page_edit_tab_meta_prepare_form
adminhtml_cmspage_on_delete
adminhtml_controller_action_predispatch_start
adminhtml_controller_catalogrule_prepare_save
adminhtml_controller_salesrule_prepare_save
adminhtml_customer_prepare_save
adminhtml_customer_save_after
adminhtml_product_attribute_types
adminhtml_promo_quote_edit_tab_main_prepare_form
adminhtml_sales_order_create_process_data
adminhtml_sales_order_creditmemo_register_before
adminhtml_widget_container_html_before
adminhtml_widget_grid_filter_collection
admin_permissions_role_prepare_save
admin_session_user_login_failed
admin_session_user_login_success
admin_system_config_changed_section_{$section}
admin_user_authenticate_after
api_user_authenticated
application_clean_cache
bundle_product_view_config
catalog_block_product_list_collection
catalog_category_change_products
catalog_category_prepare_save
catalog_category_tree_init_inactive_category_ids
catalog_category_tree_move_after
catalog_category_tree_move_before
catalog_controller_category_delete
catalog_controller_category_init_after
catalog_controller_category_init_before
catalog_controller_product_delete
catalog_controller_product_init
catalog_controller_product_init_after
catalog_controller_product_init_before
catalog_controller_product_view
catalog_helper_output_construct
catalogindex_get_minimal_price
catalogindex_plain_reindex_after
catalogindex_prepare_price_select
catalog_model_product_duplicate
catalog_prepare_price_select
catalog_product_collection_apply_limitations_after
catalog_product_collection_before_add_count_to_categories
catalog_product_collection_load_after
catalog_product_collection_load_before
catalog_product_compare_add_product
catalog_product_compare_item_collection_clear
catalog_product_compare_remove_product
catalog_product_edit_action
catalog_product_edit_form_render_recurring
catalog_product_flat_prepare_columns
catalog_product_flat_prepare_indexes
catalog_product_flat_rebuild
catalog_product_flat_update_product
catalog_product_get_final_price
catalog_product_import_after
catalog_product_is_salable_after
catalog_product_is_salable_before
catalog_product_new_action
catalog_product_prepare_index_select
catalog_product_prepare_save
catalog_product_status_update
catalog_product_to_website_change
catalog_product_type_prepare_cart_options
catalog_product_upsell
catalog_product_view_config
catalog_product_website_update
catalog_product_website_update_before
catalogrule_after_apply
catalogrule_before_apply
catalogsearch_reset_search_result
category_move
checkout_allow_guest
checkout_cart_add_product_complete
checkout_cart_product_add_after
checkout_cart_save_after
checkout_cart_update_items_after
checkout_cart_update_items_before
checkout_controller_multishipping_shipping_post
checkout_controller_onepage_save_shipping_method
checkout_multishipping_controller_success_action
checkout_onepage_controller_success_action
checkout_quote_destroy
checkout_quote_init
checkout_type_multishipping_create_orders_single
checkout_type_multishipping_set_shipping_items
checkout_type_onepage_save_order
checkout_type_onepage_save_order_after
clean_catalog_images_cache_after
clean_media_cache_after
cms_controller_router_match_before
cms_page_get_available_statuses
cms_page_prepare_save
cms_page_render
cms_wysiwyg_config_prepare
cms_wysiwyg_images_static_urls_allowed
controller_action_layout_generate_blocks_after
controller_action_layout_generate_blocks_before
controller_action_layout_generate_xml_before
controller_action_layout_load_before
controller_action_layout_render_before
'controller_action_layout_render_before_'.$this->getFullActionName
controller_action_nocookies
controller_action_noroute
controller_action_postdispatch
controller_action_postdispatch_adminhtml
'controller_action_postdispatch_'.$this->getFullActionName()
'controller_action_postdispatch_'.$this->getRequest()->getRouteName()
controller_action_predispatch
'controller_action_predispatch_'.$this->getFullActionName()
'controller_action_predispatch_'.$this->getRequest()->getRouteName()
controller_front_init_before
controller_front_init_routers
controller_front_send_response_after
core_block_abstract_prepare_layout_after
core_block_abstract_prepare_layout_before
core_block_abstract_to_html_after
core_block_abstract_to_html_before
core_collection_abstract_load_after
core_collection_abstract_load_before
core_layout_block_create_after
core_layout_update_updates_get_after
core_locale_set_locale
customer_customer_authenticated
customer_login
customer_logout
customer_registration_is_allowed
customer_session_init
default
eav_attribute_get_backend_type_by_input
eav_attribute_get_default_value_by_input
eav_collection_abstract_load_before
$eventName
google_checkout_discount_item_price
http_response_send_before
log_log_clean_after
log_log_clean_before
log_visitor_collection_load_before
model_delete_after
model_delete_before
model_delete_commit_after
model_load_after
model_load_before
model_save_after
model_save_before
model_save_commit_after
on_view_report
payment_form_block_to_html_before
payment_info_block_prepare_specific_information
payment_method_is_active
prepare_catalog_product_index_select
prepare_catalog_product_price_index_table
resource_get_tablename
review_controller_product_init
review_controller_product_init_after
review_controller_product_init_before
review_review_collection_load_before
rss_catalog_category_xml_callback
rss_catalog_new_xml_callback
rss_catalog_notify_stock_collection_select
rss_catalog_review_collection_select
rss_catalog_special_xml_callback
rss_catalog_tagged_item_xml_callback
rss_order_new_collection_select
rule_environment_collect
sales_convert_order_item_to_quote_item
sales_convert_order_to_quote
sales_convert_quote_address_to_order
sales_convert_quote_address_to_order_address
sales_convert_quote_item_to_order_item
sales_convert_quote_payment_to_order_payment
sales_convert_quote_to_order
sales_model_service_quote_submit_after
sales_model_service_quote_submit_before
sales_model_service_quote_submit_failure
sales_model_service_quote_submit_success
sales_order_creditmemo_cancel
sales_order_creditmemo_refund
sales_order_invoice_cancel
sales_order_invoice_pay
sales_order_invoice_register
sales_order_item_cancel
sales_order_payment_cancel
sales_order_payment_cancel_creditmemo
sales_order_payment_cancel_invoice
sales_order_payment_capture
sales_order_payment_pay
sales_order_payment_place_end
sales_order_payment_place_start
sales_order_payment_refund
sales_order_payment_void
sales_order_place_after
sales_order_place_before
sales_quote_add_item
sales_quote_address_discount_item
sales_quote_item_collection_products_after_load
sales_quote_item_qty_set_after
sales_quote_item_set_product
sales_quote_product_add_after
sales_quote_remove_item
salesrule_rule_condition_combine
salesrule_rule_get_coupon_types
salesrule_validator_process
sales_sale_collection_query_before
sendfriend_product
store_delete
store_group_save
tag_tag_product_collection_load_after
tax_rate_data_fetch
tax_settings_change_after
$this->_eventPrefix
$this->_eventPrefix.'_delete_after'
$this->_eventPrefix.'_delete_after_done'
$this->_eventPrefix.'_delete_before'
$this->_eventPrefix.'_delete_commit_after'
$this->_eventPrefix.'_load_after'
$this->_eventPrefix.'_load_before'
$this->_eventPrefix.'_move_after'
$this->_eventPrefix.'_move_before'
$this->_eventPrefix.'_save_after'
$this->_eventPrefix.'_save_before'
$this->_eventPrefix.'_save_commit_after'
$this->_eventPrefix.'_validate_after'
$this->_eventPrefix.'_validate_before'
wishlist_add_product
wishlist_items_renewed
wishlist_share

Hope that helps someone out! If you find any errors in this list, please let me know, or leave a comment below.

Leave a Reply