Wednesday, January 4, 2017

Magento 1.x Events Reference

Skip to end of metadata
Go to start of metadata
The following is a list of many Magento Community Edition events with module and parameters. Note that some events are dispatched with dynamically-calculated names, so this list is and always will be “incomplete”. At the bottom there is example of using an event.
MagentoModuleEvent NameParameters
MageAdminadmin_session_user_login_successarray(’user’⇒$user)
MageAdminadmin_session_user_login_failedarray(’user_name’⇒$username, ‘exception’ ⇒ $e)
MageAdminadmin_user_authenticate_afterarray(’username’ ⇒ $username,’password’ ⇒ $password,’user’ ⇒ $this,’result’ ⇒ $result)
MageAdminhtmladminhtml_block_html_beforearray(’block’ ⇒ $this)
MageAdminhtmladminhtml_catalog_category_tabsarray(’tabs’ ⇒ $this)
MageAdminhtmladminhtml_catalog_category_tree_is_moveablearray(’options’⇒$options)
MageAdminhtmladminhtml_catalog_category_tree_can_add_root_categoryarray(’category’ ⇒ $this→getCategory(),’options’ ⇒ $options,’store’ ⇒ $this→getStore()→getId())
MageAdminhtmladminhtml_catalog_category_tree_can_add_sub_categoryarray(’category’ ⇒ $this→getCategory(),’options’ ⇒ $options,’store’ ⇒ $this→getStore()→getId())
MageAdminhtmladminhtml_product_attribute_typesarray(’response’⇒$response)
MageAdminhtmladminhtml_catalog_product_edit_prepare_formarray(’form’⇒$form)
MageAdminhtmladminhtml_catalog_product_edit_element_typesarray(’response’⇒$response)
MageAdminhtmladminhtml_catalog_product_attribute_set_main_html_beforearray(’block’ ⇒ $this)
MageAdminhtmladminhtml_catalog_product_attribute_set_toolbar_main_html_beforearray(’block’ ⇒ $this)
MageAdminhtmladminhtml_catalog_product_form_prepare_excluded_field_listarray(’object’⇒$this)
MageAdminhtmladminhtml_catalog_product_edit_prepare_formarray(’form’⇒$form)
MageAdminhtmladminhtml_catalog_product_edit_element_typesarray(’response’⇒$response)
MageAdminhtmladminhtml_catalog_product_edit_tab_attributes_create_html_beforearray(’block’ ⇒ $this)
MageAdminhtmladminhtml_cms_page_edit_tab_content_prepare_formarray(’form’ ⇒ $form)
MageAdminhtmladminhtml_cms_page_edit_tab_design_prepare_formarray(’form’ ⇒ $form)
MageAdminhtmladminhtml_cms_page_edit_tab_main_prepare_formarray(’form’ ⇒ $form)
MageAdminhtmladminhtml_cms_page_edit_tab_meta_prepare_formarray(’form’ ⇒ $form)
MageAdminhtmladminhtml_widget_grid_filter_collectionarray(’collection’ ⇒ $this→getCollection(), ‘filter_values’ ⇒ $this→_filterValues)
MageAdminhtmladminhtml_widget_container_html_beforearray(’block’ ⇒ $this)
MageAdminhtmladminhtml_controller_action_predispatch_startarray()
MageAdminhtmladminhtml_customer_prepare_savearray(’customer’ ⇒ $customer, ‘request’ ⇒ $this→getRequest())
MageAdminhtmladminhtml_customer_save_afterarray(’customer’ ⇒ $customer)
MageAdminhtmlon_view_reportarray(’report’ ⇒ ‘search’)
MageAdminhtmlcatalog_category_prepare_savearray(’category’ ⇒ $category,’request’ ⇒ $this→getRequest())
MageAdminhtmlcatalog_controller_category_deletearray(’category’⇒$category)
MageAdminhtmlcatalog_product_new_actionarray(’product’ ⇒ $product)
MageAdminhtmlcatalog_product_edit_actionarray(’product’ ⇒ $product)
MageAdminhtmlcatalog_product_prepare_savearray(’product’ ⇒ $product, ‘request’ ⇒ $this→getRequest())
MageAdminhtmlcatalog_controller_product_deletearray(’product’ ⇒ $product)
MageAdminhtmlcatalog_product_to_website_changearray(
MageAdminhtmlcms_page_prepare_savearray(’page’ ⇒ $model, ‘request’ ⇒ $this→getRequest())
MageAdminhtmladminhtml_cmspage_on_deletearray(’title’ ⇒ $title, ‘status’ ⇒ ‘success’)
MageAdminhtmladminhtml_cmspage_on_deletearray(’title’ ⇒ $title, ‘status’ ⇒ ‘fail’)
MageAdminhtmladmin_permissions_role_prepare_savearray(’object’ ⇒ $role, ‘request’ ⇒ $this→getRequest())
MageAdminhtmladminhtml_controller_catalogrule_prepare_savearray(’request’ ⇒ $this→getRequest())
MageAdminhtmladminhtml_controller_salesrule_prepare_savearray(’request’ ⇒ $this→getRequest())
MageAdminhtmladminhtml_sales_order_create_process_data$eventData
MageAdminhtmladminhtml_sales_order_creditmemo_register_before$args
MageAdminhtmladmin_system_config_changed_section_{$section}array(’website’ ⇒ $website, ‘store’ ⇒ $store)
MageAdminhtmlstore_group_savearray(’group’ ⇒ $groupModel)
MageAdminhtmlstore_editarray(’store’⇒$storeModel)
MageAdminhtmlstore_addarray(’store’⇒$storeModel)
MageAdminhtmlstore_deletearray(’store’ ⇒ $model)
MageAdminhtmlsales_convert_order_to_quotearray(’order’ ⇒ $order,’quote’ ⇒ $this→getQuote())
MageAdminhtmlsales_convert_order_item_to_quote_itemarray(’order_item’ ⇒ $orderItem,’quote_item’ ⇒ $item)
MageApiapi_user_authenticatedarray(’model’ ⇒ $this,’api_key’ ⇒ $apiKey)
MageBundlebundle_product_view_config$args
MageBundleprepare_catalog_product_index_selectarray(’select’ ⇒ $select,’entity_field’ ⇒ new Zend_Db_Expr(’e.entity_id’),’website_field’ ⇒ new Zend_Db_Expr(’cw.website_id’),’store_field’ ⇒ new Zend_Db_Expr(’cs.store_id’))
MageBundleprepare_catalog_product_price_index_tablearray(’index_table’ ⇒ array(’i’ ⇒ $this→_getDefaultFinalPriceTable()),’select’ ⇒ $select,’entity_id’ ⇒ ‘i.entity_id
MageBundlecatalog_product_prepare_index_selectarray(’website’ ⇒ $website,’select’ ⇒ $select)
MageBundlecatalog_product_get_final_pricearray(’product’⇒$product)
MageCatalogcatalog_block_product_list_collectionarray(’collection’⇒$this→_getProductCollection(),)
MageCatalogcatalog_product_view_configarray(’response_object’⇒$responseObject)
MageCatalogcatalog_product_upsellarray(’product’ ⇒ $product,’collection’ ⇒ $this→_itemCollection,’limit’ ⇒ $this→getItemLimit())
MageCatalogcatalog_controller_category_init_beforearray(’controller_action’⇒$this)
MageCatalogcatalog_controller_category_init_afterarray(’category’⇒$category, ‘controller_action’⇒$this)
MageCatalogcatalog_controller_product_init_beforearray(’controller_action’⇒$this)
MageCatalogcatalog_controller_product_initarray(’product’⇒$product)
MageCatalogcatalog_controller_product_init_afterarray(’product’⇒$product, ‘controller_action’ ⇒ $this)
MageCatalogcatalog_controller_product_viewarray(’product’⇒$product)
MageCatalogcatalog_product_compare_add_productarray(’product’⇒$product)
MageCatalogcatalog_product_compare_remove_productarray(’product’⇒$item)
MageCatalogcatalog_helper_output_constructarray(’helper’⇒$this)
MageCatalogcatalog_category_tree_move_before$eventParams
MageCatalog$this→_eventPrefix.’_move_before’$eventParams
MageCatalog$this→_eventPrefix.’_move_after’$eventParams
MageCatalogcatalog_category_tree_move_after$eventParams
MageCatalogcategory_move$eventParams
MageCatalog$this→_eventPrefix.’_validate_before’array($this→_eventObject⇒$this)
MageCatalog$this→_eventPrefix.’_validate_after’array($this→_eventObject⇒$this)
MageCatalogcatalog_model_product_duplicatearray(’current_product’⇒$this, ‘new_product’⇒$newProduct)
MageCatalogcatalog_product_is_salable_beforearray(’product’ ⇒ $this)
MageCatalogcatalog_product_is_salable_afterarray(’product’ ⇒ $this,’salable’ ⇒ $object)
MageCatalog$this→_eventPrefix.’_delete_after_done’array($this→_eventObject⇒$this)
MageCatalogcatalog_product_import_afterarray()
MageCatalogcatalog_product_website_update_beforearray(’website_ids’ ⇒ $websiteIds,’product_ids’ ⇒ $productIds,’action’ ⇒ $type)
MageCatalogcatalog_product_website_updatearray(’website_ids’ ⇒ $websiteIds,’product_ids’ ⇒ $productIds,’action’ ⇒ $type)
MageCatalogcatalog_product_status_updatearray(’product_id’ ⇒ $productId,’store_id’ ⇒ $storeId,’status’ ⇒ $value)
MageCatalogcatalog_product_get_final_pricearray(’product’⇒$product)
MageCatalogcatalog_category_change_productsarray(’category’ ⇒ $category,’product_ids’ ⇒ $productIds)
MageCatalog$this→_eventPrefix . ‘_load_before’array($this→_eventObject ⇒ $this)
MageCatalog$this→_eventPrefix . ‘_load_after’array($this→_eventObject ⇒ $this)
MageCatalog$this→_eventPrefix . ‘_add_is_active_filter’array($this→_eventObject ⇒ $this)
MageCatalogcatalog_category_tree_init_inactive_category_idsarray(’tree’⇒$this)
MageCatalogcatalog_category_tree_init_inactive_category_idsarray(’tree’⇒$this)
MageCatalogcatalog_category_tree_move_beforearray(’category’ ⇒ $category,’prev_parent’ ⇒ $prevNode,’parent’ ⇒ $newParent)
MageCatalogcatalog_category_tree_move_afterarray(’category’ ⇒ $category,’prev_node’ ⇒ $prevNode,’parent’ ⇒ $newParent)
MageCatalog$this→_eventPrefix . ‘_load_before’array($this→_eventObject ⇒ $this)
MageCatalog$this→_eventPrefix . ‘_load_after’array($this→_eventObject ⇒ $this)
MageCatalog$this→_eventPrefix . ‘_add_is_active_filter’array($this→_eventObject ⇒ $this)
MageCatalogcatalogindex_prepare_price_select$eventArgs
MageCatalogcatalog_prepare_price_select$eventArgs
MageCatalogcatalog_product_collection_load_beforearray(’collection’⇒$this)
MageCatalogcatalog_product_collection_load_afterarray(’collection’⇒$this)
MageCatalogcatalog_product_collection_before_add_count_to_categoriesarray(’collection’⇒$this)
MageCatalogcatalog_product_collection_apply_limitations_afterarray(’collection’ ⇒ $this)
MageCatalogcatalog_product_compare_item_collection_clear’
MageCatalogcatalog_product_flat_prepare_columnsarray(’columns’ ⇒ $columnsObject)
MageCatalogcatalog_product_flat_prepare_indexesarray(’indexes’ ⇒ $indexesObject)
MageCatalogcatalog_product_flat_rebuildarray(’store_id’ ⇒ $store,’table’ ⇒ $this→getFlatTableName($store))
MageCatalogcatalog_product_flat_update_productarray(’store_id’ ⇒ $store,’table’ ⇒ $this→getFlatTableName($store),’product_ids’ ⇒ $productIds)
MageCatalogprepare_catalog_product_index_selectarray(’select’ ⇒ $select,’entity_field’ ⇒ new Zend_Db_Expr(’pid.entity_id’),’website_field’ ⇒ new Zend_Db_Expr(’cs.website_id’),’store_field’ ⇒ new Zend_Db_Expr(’cs.store_id’))
MageCatalogprepare_catalog_product_index_selectarray(’select’ ⇒ $select,’entity_field’ ⇒ new Zend_Db_Expr(’pvd.entity_id’),’website_field’ ⇒ new Zend_Db_Expr(’cs.website_id’),’store_field’ ⇒ new Zend_Db_Expr(’cs.store_id’))
MageCatalogprepare_catalog_product_index_selectarray(’select’ ⇒ $select,’entity_field’ ⇒ new Zend_Db_Expr(’l.parent_id’),’website_field’ ⇒ new Zend_Db_Expr(’cs.website_id’),’store_field’ ⇒ new Zend_Db_Expr(’cs.store_id’))
MageCatalogprepare_catalog_product_index_selectarray(’select’ ⇒ $select,’entity_field’ ⇒ new Zend_Db_Expr(’e.entity_id’),’website_field’ ⇒ new Zend_Db_Expr(’cw.website_id’),’store_field’ ⇒ new Zend_Db_Expr(’cs.store_id’))
MageCatalogprepare_catalog_product_price_index_tablearray(’index_table’ ⇒ array(’i’ ⇒ $this→_getDefaultFinalPriceTable()),’select’ ⇒ $select,’entity_id’ ⇒ ‘i.entity_id
MageCatalogprepare_catalog_product_price_index_selectarray(’select’ ⇒ $select,’entity_field’ ⇒ new Zend_Db_Expr(’e.entity_id’),’website_field’ ⇒ new Zend_Db_Expr(’cw.website_id’),’store_field’ ⇒ new Zend_Db_Expr(’cs.store_id’))
MageCatalogIndexcatalogindex_plain_reindex_afterarray(’products’ ⇒ $products)
MageCatalogIndexcatalogindex_prepare_price_select$args
MageCatalogIndexcatalogindex_get_minimal_price$eventData
MageCatalogIndexcatalogindex_prepare_price_select$args
MageCatalogIndexcatalogindex_prepare_price_select$args
MageCatalogIndexcatalogindex_prepare_price_select$args
MageCatalogIndexcatalogindex_prepare_price_select$args
MageCatalogRulecatalogrule_before_applyarray(’resource’⇒$this)
MageCatalogRulecatalogrule_after_applyarray(’product’⇒$product,’product_condition’ ⇒ $productCondition)
MageCatalogSearchcatalogsearch_reset_search_result’
MageCheckoutcheckout_cart_add_product_completearray(’product’ ⇒ $product, ‘request’ ⇒ $this→getRequest(), ‘response’ ⇒ $this→getResponse())
MageCheckoutcheckout_controller_multishipping_shipping_postarray(’request’⇒$this→getRequest(), ‘quote’⇒$this→_getCheckout()→getQuote())
MageCheckoutcheckout_multishipping_controller_success_action’
MageCheckoutcheckout_onepage_controller_success_action’
MageCheckoutcheckout_controller_onepage_save_shipping_methodarray(’request’⇒$this→getRequest(), ‘quote’⇒$this→getOnepage()→getQuote())
MageCheckoutcheckout_allow_guestarray(’quote’ ⇒ $quote,’store’ ⇒ $store,’result’ ⇒ $result)
MageCheckoutcheckout_cart_product_add_afterarray(’quote_item’⇒$result, ‘product’⇒$product)
MageCheckoutcheckout_cart_update_items_beforearray(’cart’⇒$this, ‘info’⇒$data)
MageCheckoutcheckout_cart_update_items_afterarray(’cart’⇒$this, ‘info’⇒$data)
MageCheckoutcheckout_cart_info_item_unset_product_beforearray(
MageCheckoutcheckout_quote_initarray(’quote’⇒$quote)
MageCheckoutcheckout_quote_destroyarray(’quote’⇒$this→getQuote())
MageCheckoutcheckout_type_multishipping_set_shipping_itemsarray(’quote’⇒$this→getQuote())
MageCheckoutcheckout_type_multishipping_create_orders_singlearray(’order’⇒$order, ‘address’⇒$address)
MageCheckoutcheckout_type_onepage_save_orderarray(’order’⇒$order, ‘quote’⇒$this→getQuote())
MageCheckoutcheckout_type_onepage_save_order_afterarray(’order’⇒$order, ‘quote’⇒$this→getQuote())
MageCmscms_controller_router_match_beforearray(’router’ ⇒ $this,’condition’ ⇒ $condition)
MageCmscms_page_get_available_statusesarray(’statuses’ ⇒ $statuses)
MageCorecore_block_abstract_prepare_layout_beforearray(’block’ ⇒ $this)
MageCorecore_block_abstract_prepare_layout_afterarray(’block’ ⇒ $this)
MageCorecore_block_abstract_to_html_beforearray(’block’ ⇒ $this)
MageCorecore_block_abstract_to_html_afterarray(’block’ ⇒ $this)
MageCorehttp_response_send_beforearray(’response’⇒$this)
MageCorecontroller_action_layout_load_beforearray(’action’⇒$this, ‘layout’⇒$this→getLayout())
MageCorecontroller_action_layout_generate_xml_beforearray(’action’⇒$this, ‘layout’⇒$this→getLayout())
MageCorecontroller_action_layout_generate_blocks_beforearray(’action’⇒$this, ‘layout’⇒$this→getLayout())
MageCorecontroller_action_layout_generate_blocks_afterarray(’action’⇒$this, ‘layout’⇒$this→getLayout())
MageCorecontroller_action_layout_render_before’
MageCorecontroller_action_layout_render_before_’.$this→getFullActionName()
MageCorecontroller_action_predispatcharray(’controller_action’⇒$this)
MageCorecontroller_action_predispatch_’.$this→getRequest()→getRouteName()array(’controller_action’⇒$this)
MageCorecontroller_action_predispatch_’.$this→getFullActionName()array(’controller_action’⇒$this)
MageCorecontroller_action_postdispatch_’.$this→getFullActionName()array(’controller_action’⇒$this)
MageCorecontroller_action_postdispatch_’.$this→getRequest()→getRouteName()array(’controller_action’⇒$this)
MageCorecontroller_action_postdispatcharray(’controller_action’⇒$this)
MageCorecontroller_action_noroutearray(’action’⇒$this, ‘status’⇒$status)
MageCorecontroller_action_nocookiesarray(’action’ ⇒ $this,’redirect’ ⇒ $redirect)
MageCorecontroller_front_init_beforearray(’front’⇒$this)
MageCorecontroller_front_init_routersarray(’front’⇒$this)
MageCoremodel_load_afterarray(’object’⇒$this)
MageCore$this→_eventPrefix.’_load_after’array($this→_eventObject⇒$this)
MageCoremodel_save_commit_afterarray(’object’⇒$this)
MageCore$this→_eventPrefix.’_save_commit_after’array($this→_eventObject⇒$this)
MageCoremodel_save_beforearray(’object’⇒$this)
MageCore$this→_eventPrefix.’_save_before’array($this→_eventObject⇒$this)
MageCoremodel_save_afterarray(’object’⇒$this)
MageCore$this→_eventPrefix.’_save_after’array($this→_eventObject⇒$this)
MageCoremodel_delete_beforearray(’object’⇒$this)
MageCore$this→_eventPrefix.’_delete_before’array($this→_eventObject⇒$this)
MageCoremodel_delete_afterarray(’object’⇒$this)
MageCore$this→_eventPrefix.’_delete_after’array($this→_eventObject⇒$this)
MageCoremodel_delete_commit_afterarray(’object’⇒$this)
MageCore$this→_eventPrefix.’_delete_commit_after’array($this→_eventObject⇒$this)
MageCoreapplication_clean_cachearray(’tags’ ⇒ $tags)
MageCorecore_locale_set_localearray(’locale’⇒$this)
MageCoreresource_get_tablenamearray(’resource’ ⇒ $this, ‘model_entity’ ⇒ $modelEntity, ‘table_name’ ⇒ $tableName)
MageCorecore_layout_update_updates_get_afterarray(’updates’ ⇒ $updatesRoot)
MageCorecore_layout_update_updates_get_afterarray(’updates’ ⇒ $updatesRoot)
MageCorecore_collection_abstract_load_beforearray(’collection’ ⇒ $this)
MageCorecore_collection_abstract_load_afterarray(’collection’ ⇒ $this)
MageCustomercustomer_registration_is_allowedarray(’result’ ⇒ $result)
MageCustomercustomer_customer_authenticatedarray(’model’ ⇒ $this,’password’ ⇒ $password,)
MageCustomercustomer_session_initarray(’customer_session’⇒$this)
MageCustomercustomer_loginarray(’customer’⇒$customer)
MageCustomercustomer_loginarray(’customer’⇒$customer)
MageCustomercustomer_loginarray(’customer’⇒$customer)
MageCustomercustomer_logoutarray(’customer’ ⇒ $this→getCustomer())
MageEavadminhtml_block_eav_attribute_edit_form_initarray(’form’ ⇒ $this→getForm())
MageEaveav_attribute_get_backend_type_by_inputarray(’model’⇒$this, ‘type’⇒$type)
MageEaveav_attribute_get_default_value_by_inputarray(’model’⇒$this, ‘type’⇒$type)
MageEaveav_collection_abstract_load_beforearray(’collection’ ⇒ $this)
MageGoogleCheckoutgoogle_checkout_discount_item_pricearray(’quote’ ⇒ $this→getQuote(), ‘discount_item’ ⇒ $discountItem)
MageLoglog_log_clean_beforearray(’log’ ⇒ $object)
MageLoglog_log_clean_afterarray(’log’ ⇒ $object)
MageLoglog_visitor_collection_load_beforearray(’collection’ ⇒ $this)
MageOscommercestore_addarray(’store’⇒$storeModel)
MagePaymentpayment_method_is_activearray(’result’ ⇒ $checkResult,’method_instance’ ⇒ $this,’quote’ ⇒ $quote,)
MagePaypalcheckout_type_onepage_save_orderarray(’order’⇒$order, ‘quote’⇒$this→getReview()→getQuote())
MagePaypalcheckout_type_onepage_save_orderarray(’order’⇒$order, ‘quote’⇒$this→getQuote())
MagePaypalUkcheckout_type_onepage_save_orderarray(’order’⇒$order, ‘quote’⇒$this→getReview()→getQuote())
MagePaypalUkcheckout_type_onepage_save_orderarray(’order’⇒$order, ‘quote’⇒$this→getQuote())
MageReviewreview_controller_product_init_beforearray(’controller_action’⇒$this)
MageReviewreview_controller_product_initarray(’product’⇒$product)
MageReviewreview_controller_product_init_afterarray(’product’⇒$product, ‘controller_action’ ⇒ $this)
MageReviewreview_review_collection_load_beforearray(’collection’ ⇒ $this)
MageRssrss_catalog_category_xml_callback$args
MageRssrss_catalog_new_xml_callback$args
MageRssrss_catalog_special_xml_callback$args
MageRssrss_catalog_tagged_item_xml_callback$args
MageRssrss_order_new_collection_selectarray(’collection’ ⇒ $collection)
MageRulerule_environment_collectarray(’env’⇒$this)
MageSalessales_order_place_beforearray(’order’⇒$this)
MageSalessales_order_place_afterarray(’order’⇒$this)
MageSalessales_quote_remove_itemarray(’quote_item’ ⇒ $item)
MageSalessales_quote_add_itemarray(’quote_item’ ⇒ $item)
MageSales$this→_eventPrefix . ‘_collect_totals_before’array($this→_eventObject⇒$this)
MageSales$this→_eventPrefix . ‘_collect_totals_after’array($this→_eventObject⇒$this)
MageSales$this→_eventPrefix . ‘_merge_before’array($this→_eventObject⇒$this,’source’⇒$quote)
MageSales$this→_eventPrefix . ‘_merge_after’array($this→_eventObject⇒$this,’source’⇒$quote)
MageSalessales_convert_order_to_quotearray(’order’⇒$order, ‘quote’⇒$quote)
MageSalessales_convert_quote_to_orderarray(’order’⇒$order, ‘quote’⇒$quote)
MageSalessales_convert_quote_address_to_orderarray(’address’⇒$address, ‘order’⇒$order)
MageSalessales_convert_quote_address_to_order_addressarray(’address’ ⇒ $address, ‘order_address’ ⇒ $orderAddress)
MageSalessales_convert_quote_payment_to_order_paymentarray(’order_payment’ ⇒ $orderPayment, ‘quote_payment’ ⇒ $payment)
MageSalessales_convert_quote_item_to_order_itemarray(’order_item’⇒$orderItem, ‘item’⇒$item)
MageSalessales_quote_item_collection_products_after_loadarray(’product_collection’⇒$productCollection)
MageSalessales_sale_collection_query_beforearray(’collection’ ⇒ $this)
MageSalessales_order_creditmemo_refundarray($this→_eventObject⇒$this)
MageSalessales_order_creditmemo_cancelarray($this→_eventObject⇒$this)
MageSalessales_order_invoice_payarray($this→_eventObject⇒$this)
MageSalessales_order_invoice_cancelarray($this→_eventObject⇒$this)
MageSalessales_order_item_cancelarray(’item’⇒$this)
MageSalessales_order_payment_place_startarray(’payment’ ⇒ $this)
MageSalessales_order_payment_place_endarray(’payment’ ⇒ $this)
MageSalessales_order_payment_capturearray(’payment’ ⇒ $this, ‘invoice’ ⇒ $invoice)
MageSalessales_order_payment_payarray(’payment’ ⇒ $this, ‘invoice’ ⇒ $invoice)
MageSalessales_order_payment_cancel_invoicearray(’payment’ ⇒ $this, ‘invoice’ ⇒ $invoice)
MageSalessales_order_payment_voidarray(’payment’ ⇒ $this, ‘invoice’ ⇒ $document)
MageSalessales_order_payment_refundarray(’payment’ ⇒ $this, ‘creditmemo’ ⇒ $creditmemo)
MageSalessales_order_payment_cancel_creditmemoarray(’payment’ ⇒ $this, ‘creditmemo’ ⇒ $creditmemo)
MageSalessales_order_payment_cancelarray(’payment’ ⇒ $this)
MageSalessales_quote_item_qty_set_afterarray(’item’⇒$this)
MageSalessales_quote_item_set_productarray(’product’ ⇒ $product,’quote_item’⇒$this)
MageSales$this→_eventPrefix . ‘_import_data_before’array($this→_eventObject⇒$this,’input’⇒$data,)
MageSalessales_quote_address_discount_item$eventArgs
MageSalessales_quote_address_discount_item$eventArgs
MageSalesRulesalesrule_validator_processarray(’rule’ ⇒ $rule,’item’ ⇒ $item,’address’ ⇒ $address,’quote’ ⇒ $quote,’qty’ ⇒ $qty,’result’ ⇒ $result,)
MageSalesRulesales_quote_address_discount_item$eventArgs
MageSalesRulesales_quote_address_discount_item$eventArgs
MageSalesRulesalesrule_rule_condition_combinearray(’additional’ ⇒ $additional)
MageSendfriendsendfriend_productarray(’product’ ⇒ $product)
MageTagtag_tag_product_collection_load_afterarray(’collection’ ⇒ $this)
MageTaxtax_rate_data_fetcharray(’request’⇒$this)
MageTaxtax_settings_change_after’
MageTaxtax_settings_change_after’
MageTaxtax_settings_change_after’
MageTaxtax_settings_change_after’
MageTaxtax_settings_change_after’
MageWishlistwishlist_add_productarray(’wishlist’⇒$wishlist, ‘product’⇒$product)
MageWishlistwishlist_sharearray(’wishlist’⇒$wishlist)
This is what should be put in config.xml of your module to hook on an event.
 Collapse source
1
2
3
4
5
6
7
8
9
10
11
12
13
<global> ....
      <events>
          <controller_front_init_before>
              <observers>
                  <init_store_from_ip>
                      <type>singleton</type>
                      <class>geoIPlocator/observer</class>
                      <method>assignStoreView</method>
                  </init_store_from_ip>
              </observers>
          </controller_front_init_before>
      </events>
.... </global
Courtesy: https://magento2.atlassian.net/wiki/display/m1wiki/Magento+1.x+Events+Reference



also please look http://www.magereverse.com/ 
https://inchoo.net/wp-content/uploads/2010/09/MAGENTO_v1.3.2.4-Database_Diagram.pdf

ER Diagram Magento Database

PHP way to clear cache.

<?php
$magePath = 'app/Mage.php';
require_once $magePath;
umask(0);
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$types = array("config", "layout", "block_html", "translate", "collections", "eav", "config_api", "full_page");
foreach($types as $type) {
    Mage::app()->getCacheInstance()->cleanType($type);
}
Mage::app()->cleanCache();

Wednesday, December 28, 2016

MIME Types

ExtensionKind of documentMIME Type
.aacAAC audio fileaudio/aac
.abwAbiWord documentapplication/x-abiword
.arcArchive document (multiple files embedded)application/octet-stream
.aviAVI: Audio Video Interleavevideo/x-msvideo
.azwAmazon Kindle eBook formatapplication/vnd.amazon.ebook
.binAny kind of binary dataapplication/octet-stream
.bzBZip archiveapplication/x-bzip
.bz2BZip2 archiveapplication/x-bzip2
.cshC-Shell scriptapplication/x-csh
.cssCascading Style Sheets (CSS)text/css
.csvComma-separated values (CSV)text/csv
.docMicrosoft Wordapplication/msword
.epubElectronic publication (EPUB)application/epub+zip
.gifGraphics Interchange Format (GIF)image/gif
.htm
.html
HyperText Markup Language (HTML)text/html
.icoIcon formatimage/x-icon
.icsiCalendar formattext/calendar
.jarJava Archive (JAR)application/java-archive
.jpeg
.jpg
JPEG imagesimage/jpeg
.jsJavaScript (ECMAScript)application/js
.jsonJSON formatapplication/json
.mid
.midi
Musical Instrument Digital Interface (MIDI)audio/midi
.mpegMPEG Videovideo/mpeg
.mpkgApple Installer Packageapplication/vnd.apple.installer+xml
.odpOpenDocuemnt presentation documentapplication/vnd.oasis.opendocument.presentation
.odsOpenDocuemnt spreadsheet documentapplication/vnd.oasis.opendocument.spreadsheet
.odtOpenDocument text documentapplication/vnd.oasis.opendocument.text
.ogaOGG audioaudio/ogg
.ogvOGG videovideo/ogg
.ogxOGGapplication/ogg
.pdfAdobe Portable Document Format (PDF)application/pdf
.pptMicrosoft PowerPointapplication/vnd.ms-powerpoint
.rarRAR archiveapplication/x-rar-compressed
.rtfRich Text Format (RTF)application/rtf
.shBourne shell scriptapplication/x-sh
.svgScalable Vector Graphics (SVG)image/svg+xml
.swfSmall web format (SWF) or Adobe Flash documentapplication/x-shockwave-flash
.tarTape Archive (TAR)application/x-tar
.tif
.tiff
Tagged Image File Format (TIFF)image/tiff
.ttfTrueType Fontapplication/x-font-ttf
.vsdMicrosft Visioapplication/vnd.visio
.wavWaveform Audio Formataudio/x-wav
.webaWEBM audioaudio/webm
.webmWEBM videovideo/webm
.webpWEBP imageimage/webp
.woffWeb Open Font Format (WOFF)application/x-font-woff
.xhtmlXHTMLapplication/xhtml+xml
.xlsMicrosoft Excelapplication/vnd.ms-excel
.xmlXMLapplication/xml
.xulXULapplication/vnd.mozilla.xul+xml
.zipZIP archiveapplication/zip
.3gp3GPP audio/video containervideo/3gpp
audio/3gpp if it doesn't contain video
.3g23GPP2 audio/video containervideo/3gpp2
audio/3gpp2 if it doesn't contain video
.7z7-zip archiveapplication/x-7z-compressed

Monday, November 28, 2016

Common Database Configuration File Locations

Please note that the information below is provided to assist you with changing the connection strings of the most commonly used database driven web applications and we cannot offer a guide on every possible software solution available.

Wordpress configuration file location : httpdocs/wp-config.php
/** MySQL database password */   
define('DB_PASSWORD', '** new password here **');
Joomla configuration file location : httpdocs/configuaration.php
var $password = '** new password here **';
Drupal configuration file location : httpdocs/sites/default/settings
$databases = array (  
'default' =>   
array (   
'default' => [  
array (   
'database' => 'database-name',   
'username' => 'database-username',  
'password' => '**new password here***',   
'host' => 'localhost',     
'port' => '',   
'driver' => 'mysql',  
'prefix' => '',
OSCommerce 2.2 Configuration file location : httpdocs/includes/configure.php & httpdocs/admin/includes/configure.php
define('DB_SERVER_PASSWORD', '** new password **');

The password needs to be changed in both files. 

Moodle 2 configuration file location : httpdocs/config.php
$CFG->dbpass = '** new password here **';
Magento configuration file location : httpdocs/app/etc/local.xml
<password><![CDATA[** new password here ** ]]></password>



courtesy:  https://www.names.co.uk/support/1304-common_database_configuration_file_locations.html  

Thursday, November 17, 2016

Check if SKU exist or not,

$sku = 'sku here';
$id = Mage::getModel('catalog/product')->getIdBySku($sku);
if ($id) {
   //sku exists
}
else {
   //sku does not exist
}
simple???