- 浏览: 200488 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
guji528:
使用Python通过正则表达式替换很方便:
sprin ...
Python正则表达式指南 -
guji528:
很实用,先keep再看
Python正则表达式指南 -
yushine:
1,2,3,5 已经做了剩下的本来也正准备做。
2012, 每一个软件工程师必须做的11件事 -
mynetstudy:
用导出不就可以了吗
递归删除SVN工作目录下的.svn目录
Magento Community Edition事件机制清单及其参数解释
$eventArgs
代码池 | 模块区 | 事件名 | 事件参数 |
Mage | Admin | admin_session_user_login_success | array(‘user’=>$user) |
Mage | Admin | admin_session_user_login_failed | array(‘user_name’=>$username, ‘exception’ => $e) |
Mage | Admin | admin_user_authenticate_after | array(‘username’ => $username,’password’ => $password,’user’ => $this,’result’ => $result) |
Mage | Adminhtml | adminhtml_block_html_before | array(‘block’ => $this) |
Mage | Adminhtml | adminhtml_catalog_category_tabs | array(‘tabs’ => $this) |
Mage | Adminhtml | adminhtml_catalog_category_tree_is_moveable | array(‘options’=>$options) |
Mage | Adminhtml | adminhtml_catalog_category_tree_can_add_root_category | array(‘category’ => $this→getCategory(),’options’ => $options,’store’ => $this→getStore()→getId()) |
Mage | Adminhtml | adminhtml_catalog_category_tree_can_add_sub_category | array(‘category’ => $this→getCategory(),’options’ => $options,’store’ => $this→getStore()→getId()) |
Mage | Adminhtml | adminhtml_product_attribute_types | array(‘response’=>$response) |
Mage | Adminhtml | adminhtml_catalog_product_edit_prepare_form | array(‘form’=>$form) |
Mage | Adminhtml | adminhtml_catalog_product_edit_element_types | array(‘response’=>$response) |
Mage | Adminhtml | adminhtml_catalog_product_attribute_set_main_html_before | array(‘block’ => $this) |
Mage | Adminhtml | adminhtml_catalog_product_attribute_set_toolbar_main_html_before | array(‘block’ => $this) |
Mage | Adminhtml | adminhtml_catalog_product_form_prepare_excluded_field_list | array(‘object’=>$this) |
Mage | Adminhtml | adminhtml_catalog_product_edit_prepare_form | array(‘form’=>$form) |
Mage | Adminhtml | adminhtml_catalog_product_edit_element_types | array(‘response’=>$response) |
Mage | Adminhtml | adminhtml_catalog_product_edit_tab_attributes_create_html_before | array(‘block’ => $this) |
Mage | Adminhtml | adminhtml_cms_page_edit_tab_content_prepare_form | array(‘form’ => $form) |
Mage | Adminhtml | adminhtml_cms_page_edit_tab_design_prepare_form | array(‘form’ => $form) |
Mage | Adminhtml | adminhtml_cms_page_edit_tab_main_prepare_form | array(‘form’ => $form) |
Mage | Adminhtml | adminhtml_cms_page_edit_tab_meta_prepare_form | array(‘form’ => $form) |
Mage | Adminhtml | adminhtml_widget_grid_filter_collection | array(‘collection’ => $this→getCollection(), ‘filter_values’ => $this→_filterValues) |
Mage | Adminhtml | adminhtml_widget_container_html_before | array(‘block’ => $this) |
Mage | Adminhtml | adminhtml_controller_action_predispatch_start | array() |
Mage | Adminhtml | adminhtml_customer_prepare_save | array(‘customer’ => $customer, ‘request’ => $this→getRequest()) |
Mage | Adminhtml | adminhtml_customer_save_after | array(‘customer’ => $customer) |
Mage | Adminhtml | on_view_report | array(‘report’ => ’search’) |
Mage | Adminhtml | catalog_category_prepare_save | array(‘category’ => $category,’request’ => $this→getRequest()) |
Mage | Adminhtml | catalog_controller_category_delete | array(‘category’=>$category) |
Mage | Adminhtml | catalog_product_new_action | array(‘product’ => $product) |
Mage | Adminhtml | catalog_product_edit_action | array(‘product’ => $product) |
Mage | Adminhtml | catalog_product_prepare_save | array(‘product’ => $product, ‘request’ => $this→getRequest()) |
Mage | Adminhtml | catalog_controller_product_delete | array(‘product’ => $product) |
Mage | Adminhtml | catalog_product_to_website_change | array( |
Mage | Adminhtml | cms_page_prepare_save | array(‘page’ => $model, ‘request’ => $this→getRequest()) |
Mage | Adminhtml | adminhtml_cmspage_on_delete | array(‘title’ => $title, ’status’ => ’success’) |
Mage | Adminhtml | adminhtml_cmspage_on_delete | array(‘title’ => $title, ’status’ => ‘fail’) |
Mage | Adminhtml | admin_permissions_role_prepare_save | array(‘object’ => $role, ‘request’ => $this→getRequest()) |
Mage | Adminhtml | adminhtml_controller_catalogrule_prepare_save | array(‘request’ => $this→getRequest()) |
Mage | Adminhtml | adminhtml_controller_salesrule_prepare_save | array(‘request’ => $this→getRequest()) |
Mage | Adminhtml | adminhtml_sales_order_create_process_data | $eventData |
Mage | Adminhtml | adminhtml_sales_order_creditmemo_register_before | $args |
Mage | Adminhtml | admin_system_config_changed_section_{$section} | array(‘website’ => $website, ’store’ => $store) |
Mage | Adminhtml | store_group_save | array(‘group’ => $groupModel) |
Mage | Adminhtml | store_edit | array(’store’=>$storeModel) |
Mage | Adminhtml | store_add | array(’store’=>$storeModel) |
Mage | Adminhtml | store_delete | array(’store’ => $model) |
Mage | Adminhtml | sales_convert_order_to_quote | array(‘order’ => $order,’quote’ => $this→getQuote()) |
Mage | Adminhtml | sales_convert_order_item_to_quote_item | array(‘order_item’ => $orderItem,’quote_item’ => $item) |
Mage | Api | api_user_authenticated | array(‘model’ => $this,’api_key’ => $apiKey) |
Mage | Bundle | bundle_product_view_config $args | |
Mage | Bundle | prepare_catalog_product_index_select | array(’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’)) |
Mage | Bundle | prepare_catalog_product_price_index_table | array(‘index_table’ => array(‘i’ => $this→_getDefaultFinalPriceTable()),’select’ => $select,’entity_id’ => ‘i.entity_id |
Mage | Bundle | catalog_product_prepare_index_select | array(‘website’ => $website,’select’ => $select) |
Mage | Bundle | catalog_product_get_final_price | array(‘product’=>$product) |
Mage | Catalog | catalog_block_product_list_collection | array(‘collection’=>$this→_getProductCollection(),) |
Mage | Catalog | catalog_product_view_config | array(‘response_object’=>$responseObject) |
Mage | Catalog | catalog_product_upsell | array(‘product’ => $product,’collection’ => $this→_itemCollection,’limit’ => $this→getItemLimit()) |
Mage | Catalog | catalog_controller_category_init_before | array(‘controller_action’=>$this) |
Mage | Catalog | catalog_controller_category_init_after | array(‘category’=>$category, ‘controller_action’=>$this) |
Mage | Catalog | catalog_controller_product_init_before | array(‘controller_action’=>$this) |
Mage | Catalog | catalog_controller_product_init | array(‘product’=>$product) |
Mage | Catalog | catalog_controller_product_init_after | array(‘product’=>$product, ‘controller_action’ => $this) |
Mage | Catalog | catalog_controller_product_view | array(‘product’=>$product) |
Mage | Catalog | catalog_product_compare_add_product | array(‘product’=>$product) |
Mage | Catalog | catalog_product_compare_remove_product | array(‘product’=>$item) |
Mage | Catalog | catalog_helper_output_construct | array(‘helper’=>$this) |
Mage | Catalog | catalog_category_tree_move_before | $eventParams |
Mage | Catalog | $this→_eventPrefix.’_move_before’ | $eventParams |
Mage | Catalog | $this→_eventPrefix.’_move_after’ | $eventParams |
Mage | Catalog | catalog_category_tree_move_after | $eventParams |
Mage | Catalog | category_move | $eventParams |
Mage | Catalog | $this→_eventPrefix.’_validate_before’ | array($this→_eventObject=>$this) |
Mage | Catalog | $this→_eventPrefix.’_validate_after’ | array($this→_eventObject=>$this) |
Mage | Catalog | catalog_model_product_duplicate | array(‘current_product’=>$this, ‘new_product’=>$newProduct) |
Mage | Catalog | catalog_product_is_salable_before | array(‘product’ => $this) |
Mage | Catalog | catalog_product_is_salable_after | array(‘product’ => $this,’salable’ => $object) |
Mage | Catalog | $this→_eventPrefix.’_delete_after_done’ | array($this→_eventObject=>$this) |
Mage | Catalog | catalog_product_import_after | array() |
Mage | Catalog | catalog_product_website_update_before | array(‘website_ids’ => $websiteIds,’product_ids’ => $productIds,’action’ => $type) |
Mage | Catalog | catalog_product_website_update | array(‘website_ids’ => $websiteIds,’product_ids’ => $productIds,’action’ => $type) |
Mage | Catalog | catalog_product_status_update | array(‘product_id’ => $productId,’store_id’ => $storeId,’status’ => $value) |
Mage | Catalog | catalog_product_get_final_price | array(‘product’=>$product) |
Mage | Catalog | catalog_category_change_products | array(‘category’ => $category,’product_ids’ => $productIds) |
Mage | Catalog | $this→_eventPrefix . ‘_load_before’ | array($this→_eventObject => $this) |
Mage | Catalog | $this→_eventPrefix . ‘_load_after’ | array($this→_eventObject => $this) |
Mage | Catalog | $this→_eventPrefix . ‘_add_is_active_filter’ | array($this→_eventObject => $this) |
Mage | Catalog | catalog_category_tree_init_inactive_category_ids | array(‘tree’=>$this) |
Mage | Catalog | catalog_category_tree_init_inactive_category_ids | array(‘tree’=>$this) |
Mage | Catalog | catalog_category_tree_move_before | array(‘category’ => $category,’prev_parent’ => $prevNode,’parent’ => $newParent) |
Mage | Catalog | catalog_category_tree_move_after | array(‘category’ => $category,’prev_node’ => $prevNode,’parent’ => $newParent) |
Mage | Catalog | $this→_eventPrefix . ‘_load_before’ | array($this→_eventObject => $this) |
Mage | Catalog | $this→_eventPrefix . ‘_load_after’ | array($this→_eventObject => $this) |
Mage | Catalog | $this→_eventPrefix . ‘_add_is_active_filter’ | array($this→_eventObject => $this) |
Mage | Catalog | catalogindex_prepare_price_select | $eventArgs |
Mage | Catalog | catalog_prepare_price_select | $eventArgs |
Mage | Catalog | catalog_product_collection_load_before | array(‘collection’=>$this) |
Mage | Catalog | catalog_product_collection_load_after | array(‘collection’=>$this) |
Mage | Catalog | catalog_product_collection_before_add_count_to_categories | array(‘collection’=>$this) |
Mage | Catalog | catalog_product_collection_apply_limitations_after | array(‘collection’ => $this) |
Mage | Catalog | catalog_product_compare_item_collection_clear | |
Mage | Catalog | catalog_product_flat_prepare_columns | array(‘columns’ => $columnsObject) |
Mage | Catalog | catalog_product_flat_prepare_indexes | array(‘indexes’ => $indexesObject) |
Mage | Catalog | catalog_product_flat_rebuild | array(’store_id’ => $store,’table’ => $this→getFlatTableName($store)) |
Mage | Catalog | catalog_product_flat_update_product | array(’store_id’ => $store,’table’ => $this→getFlatTableName($store),’product_ids’ => $productIds) |
Mage | Catalog | prepare_catalog_product_index_select | array(’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’)) |
Mage | Catalog | prepare_catalog_product_index_select | array(’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’)) |
Mage | Catalog | prepare_catalog_product_index_select | array(’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’)) |
Mage | Catalog | prepare_catalog_product_index_select | array(’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’)) |
Mage | Catalog | prepare_catalog_product_price_index_table | array(‘index_table’ => array(‘i’ => $this→_getDefaultFinalPriceTable()),’select’ => $select,’entity_id’ => ‘i.entity_id |
Mage | Catalog | prepare_catalog_product_price_index_select | array(’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’)) |
Mage | CatalogIndex | catalogindex_plain_reindex_after | array(‘products’ => $products) |
Mage | CatalogIndex | catalogindex_prepare_price_select | $args |
Mage | CatalogIndex | catalogindex_get_minimal_price | $eventData |
Mage | CatalogIndex | catalogindex_prepare_price_select | $args |
Mage | CatalogIndex | catalogindex_prepare_price_select | $args |
Mage | CatalogIndex | catalogindex_prepare_price_select | $args |
Mage | CatalogIndex | catalogindex_prepare_price_select | $args |
Mage | CatalogRule | catalogrule_before_apply | array(‘resource’=>$this) |
Mage | CatalogRule | catalogrule_after_apply | array(‘product’=>$product,’product_condition’ => $productCondition) |
Mage | CatalogSearch | catalogsearch_reset_search_result’ | |
Mage | Checkout | checkout_cart_add_product_complete | array(‘product’ => $product, ‘request’ => $this→getRequest(), ‘response’ => $this→getResponse()) |
Mage | Checkout | checkout_controller_multishipping_shipping_post | array(‘request’=>$this→getRequest(), ‘quote’=>$this→_getCheckout()→getQuote()) |
Mage | Checkout | checkout_multishipping_controller_success_action’ | |
Mage | Checkout | checkout_onepage_controller_success_action’ | |
Mage | Checkout | checkout_controller_onepage_save_shipping_method | array(‘request’=>$this→getRequest(), ‘quote’=>$this→getOnepage()→getQuote()) |
Mage | Checkout | checkout_allow_guest | array(‘quote’ => $quote,’store’ => $store,’result’ => $result) |
Mage | Checkout | checkout_cart_product_add_after | array(‘quote_item’=>$result, ‘product’=>$product) |
Mage | Checkout | checkout_cart_update_items_before | array(‘cart’=>$this, ‘info’=>$data) |
Mage | Checkout | checkout_cart_update_items_after | array(‘cart’=>$this, ‘info’=>$data) |
Mage | Checkout | checkout_cart_info_item_unset_product_before | array( |
Mage | Checkout | checkout_quote_init | array(‘quote’=>$quote) |
Mage | Checkout | checkout_quote_destroy | array(‘quote’=>$this→getQuote()) |
Mage | Checkout | checkout_type_multishipping_set_shipping_items | array(‘quote’=>$this→getQuote()) |
Mage | Checkout | checkout_type_multishipping_create_orders_single | array(‘order’=>$order, ‘address’=>$address) |
Mage | Checkout | checkout_type_onepage_save_order | array(‘order’=>$order, ‘quote’=>$this→getQuote()) |
Mage | Checkout | checkout_type_onepage_save_order_after | array(‘order’=>$order, ‘quote’=>$this→getQuote()) |
Mage | Cms | cms_controller_router_match_before | array(‘router’ => $this,’condition’ => $condition) |
Mage | Cms | cms_page_get_available_statuses | array(’statuses’ => $statuses) |
Mage | Core | core_block_abstract_prepare_layout_before | array(‘block’ => $this) |
Mage | Core | core_block_abstract_prepare_layout_after | array(‘block’ => $this) |
Mage | Core | core_block_abstract_to_html_before | array(‘block’ => $this) |
Mage | Core | core_block_abstract_to_html_after | array(‘block’ => $this) |
Mage | Core | http_response_send_before | array(‘response’=>$this) |
Mage | Core | controller_action_layout_load_before | array(‘action’=>$this, ‘layout’=>$this→getLayout()) |
Mage | Core | controller_action_layout_generate_xml_before | array(‘action’=>$this, ‘layout’=>$this→getLayout()) |
Mage | Core | controller_action_layout_generate_blocks_before | array(‘action’=>$this, ‘layout’=>$this→getLayout()) |
Mage | Core | controller_action_layout_generate_blocks_after | array(‘action’=>$this, ‘layout’=>$this→getLayout()) |
Mage | Core | controller_action_layout_render_before’ | |
Mage | Core | controller_action_layout_render_before_’.$this→getFullActionName() | |
Mage | Core | controller_action_predispatch | array(‘controller_action’=>$this) |
Mage | Core | controller_action_predispatch_’.$this→getRequest()→getRouteName() | array(‘controller_action’=>$this) |
Mage | Core | controller_action_predispatch_’.$this→getFullActionName() | array(‘controller_action’=>$this) |
Mage | Core | controller_action_postdispatch_’.$this→getFullActionName() | array(‘controller_action’=>$this) |
Mage | Core | controller_action_postdispatch_’.$this→getRequest()→getRouteName() | array(‘controller_action’=>$this) |
Mage | Core | controller_action_postdispatch | array(‘controller_action’=>$this) |
Mage | Core | controller_action_noroute | array(‘action’=>$this, ’status’=>$status) |
Mage | Core | controller_action_nocookies | array(‘action’ => $this,’redirect’ => $redirect) |
Mage | Core | controller_front_init_before | array(‘front’=>$this) |
Mage | Core | controller_front_init_routers | array(‘front’=>$this) |
Mage | Core | model_load_after | array(‘object’=>$this) |
Mage | Core | $this→_eventPrefix.’_load_after’ | array($this→_eventObject=>$this) |
Mage | Core | model_save_commit_after | array(‘object’=>$this) |
Mage | Core | $this→_eventPrefix.’_save_commit_after’ | array($this→_eventObject=>$this) |
Mage | Core | model_save_before | array(‘object’=>$this) |
Mage | Core | $this→_eventPrefix.’_save_before’ | array($this→_eventObject=>$this) |
Mage | Core | model_save_after | array(‘object’=>$this) |
Mage | Core | $this→_eventPrefix.’_save_after’ | array($this→_eventObject=>$this) |
Mage | Core | model_delete_before | array(‘object’=>$this) |
Mage | Core | $this→_eventPrefix.’_delete_before’ | array($this→_eventObject=>$this) |
Mage | Core | model_delete_after | array(‘object’=>$this) |
Mage | Core | $this→_eventPrefix.’_delete_after’ | array($this→_eventObject=>$this) |
Mage | Core | model_delete_commit_after | array(‘object’=>$this) |
Mage | Core | $this→_eventPrefix.’_delete_commit_after’ | array($this→_eventObject=>$this) |
Mage | Core | application_clean_cache | array(‘tags’ => $tags) |
Mage | Core | core_locale_set_locale | array(‘locale’=>$this) |
Mage | Core | resource_get_tablename | array(‘resource’ => $this, ‘model_entity’ => $modelEntity, ‘table_name’ => $tableName) |
Mage | Core | core_layout_update_updates_get_after | array(‘updates’ => $updatesRoot) |
Mage | Core | core_layout_update_updates_get_after | array(‘updates’ => $updatesRoot) |
Mage | Core | core_collection_abstract_load_before | array(‘collection’ => $this) |
Mage | Core | core_collection_abstract_load_after | array(‘collection’ => $this) |
Mage | Customer | customer_registration_is_allowed | array(‘result’ => $result) |
Mage | Customer | customer_customer_authenticated | array(‘model’ => $this,’password’ => $password,) |
Mage | Customer | customer_session_init | array(‘customer_session’=>$this) |
Mage | Customer | customer_login | array(‘customer’=>$customer) |
Mage | Customer | customer_login | array(‘customer’=>$customer) |
Mage | Customer | customer_login | array(‘customer’=>$customer) |
Mage | Customer | customer_logout | array(‘customer’ => $this→getCustomer()) |
Mage | Eav | adminhtml_block_eav_attribute_edit_form_init | array(‘form’ => $this→getForm()) |
Mage | Eav | eav_attribute_get_backend_type_by_input | array(‘model’=>$this, ‘type’=>$type) |
Mage | Eav | eav_attribute_get_default_value_by_input | array(‘model’=>$this, ‘type’=>$type) |
Mage | Eav | eav_collection_abstract_load_before | array(‘collection’ => $this) |
Mage | GoogleCheckout | google_checkout_discount_item_price | array(‘quote’ => $this→getQuote(), ‘discount_item’ => $discountItem) |
Mage | Log | log_log_clean_before | array(‘log’ => $object) |
Mage | Log | log_log_clean_after | array(‘log’ => $object) |
Mage | Log | log_visitor_collection_load_before | array(‘collection’ => $this) |
Mage | Oscommerce | store_add | array(’store’=>$storeModel) |
Mage | Payment | payment_method_is_active | array(‘result’ => $checkResult,’method_instance’ => $this,’quote’ => $quote,) |
Mage | Paypal | checkout_type_onepage_save_order | array(‘order’=>$order, ‘quote’=>$this→getReview()→getQuote()) |
Mage | Paypal | checkout_type_onepage_save_order | array(‘order’=>$order, ‘quote’=>$this→getQuote()) |
Mage | PaypalUk | checkout_type_onepage_save_order | array(‘order’=>$order, ‘quote’=>$this→getReview()→getQuote()) |
Mage | PaypalUk | checkout_type_onepage_save_order | array(‘order’=>$order, ‘quote’=>$this→getQuote()) |
Mage | Review | review_controller_product_init_before | array(‘controller_action’=>$this) |
Mage | Review | review_controller_product_init | array(‘product’=>$product) |
Mage | Review | review_controller_product_init_after | array(‘product’=>$product, ‘controller_action’ => $this) |
Mage | Review | review_review_collection_load_before | array(‘collection’ => $this) |
Mage | Rss | rss_catalog_category_xml_callback | $args |
Mage | Rss | rss_catalog_new_xml_callback | $args |
Mage | Rss | rss_catalog_special_xml_callback | $args |
Mage | Rss | rss_catalog_tagged_item_xml_callback | $args |
Mage | Rss | rss_order_new_collection_select | array(‘collection’ => $collection) |
Mage | Rule | rule_environment_collect | array(‘env’=>$this) |
Mage | Sales | sales_order_place_before | array(‘order’=>$this) |
Mage | Sales | sales_order_place_after | array(‘order’=>$this) |
Mage | Sales | sales_quote_remove_item | array(‘quote_item’ => $item) |
Mage | Sales | sales_quote_add_item | array(‘quote_item’ => $item) |
Mage | Sales | $this→_eventPrefix . ‘_collect_totals_before’ | array($this→_eventObject=>$this) |
Mage | Sales | $this→_eventPrefix . ‘_collect_totals_after’ | array($this→_eventObject=>$this) |
Mage | Sales | $this→_eventPrefix . ‘_merge_before’ | array($this→_eventObject=>$this,’source’=>$quote) |
Mage | Sales | $this→_eventPrefix . ‘_merge_after’ | array($this→_eventObject=>$this,’source’=>$quote) |
Mage | Sales | sales_convert_order_to_quote | array(‘order’=>$order, ‘quote’=>$quote) |
Mage | Sales | sales_convert_quote_to_order | array(‘order’=>$order, ‘quote’=>$quote) |
Mage | Sales | sales_convert_quote_address_to_order | array(‘address’=>$address, ‘order’=>$order) |
Mage | Sales | sales_convert_quote_address_to_order_address | array(‘address’ => $address, ‘order_address’ => $orderAddress) |
Mage | Sales | sales_convert_quote_payment_to_order_payment | array(‘order_payment’ => $orderPayment, ‘quote_payment’ => $payment) |
Mage | Sales | sales_convert_quote_item_to_order_item | array(‘order_item’=>$orderItem, ‘item’=>$item) |
Mage | Sales | sales_quote_item_collection_products_after_load | array(‘product_collection’=>$productCollection) |
Mage | Sales | sales_sale_collection_query_before | array(‘collection’ => $this) |
Mage | Sales | sales_order_creditmemo_refund | array($this→_eventObject=>$this) |
Mage | Sales | sales_order_creditmemo_cancel | array($this→_eventObject=>$this) |
Mage | Sales | sales_order_invoice_pay | array($this→_eventObject=>$this) |
Mage | Sales | sales_order_invoice_cancel | array($this→_eventObject=>$this) |
Mage | Sales | sales_order_item_cancel | array(‘item’=>$this) |
Mage | Sales | sales_order_payment_place_start | array(‘payment’ => $this) |
Mage | Sales | sales_order_payment_place_end | array(‘payment’ => $this) |
Mage | Sales | sales_order_payment_capture | array(‘payment’ => $this, ‘invoice’ => $invoice) |
Mage | Sales | sales_order_payment_pay | array(‘payment’ => $this, ‘invoice’ => $invoice) |
Mage | Sales | sales_order_payment_cancel_invoice | array(‘payment’ => $this, ‘invoice’ => $invoice) |
Mage | Sales | sales_order_payment_void | array(‘payment’ => $this, ‘invoice’ => $document) |
Mage | Sales | sales_order_payment_refund | array(‘payment’ => $this, ‘creditmemo’ => $creditmemo) |
Mage | Sales | sales_order_payment_cancel_creditmemo | array(‘payment’ => $this, ‘creditmemo’ => $creditmemo) |
Mage | Sales | sales_order_payment_cancel | array(‘payment’ => $this) |
Mage | Sales | sales_quote_item_qty_set_after | array(‘item’=>$this) |
Mage | Sales | sales_quote_item_set_product | array(‘product’ => $product,’quote_item’=>$this) |
Mage | Sales | $this→_eventPrefix . ‘_import_data_before’ | array($this→_eventObject=>$this,’input’=>$data,) |
Mage | Sales | sales_quote_address_discount_item | $eventArgs |
Mage | Sales | sales_quote_address_discount_item | |
Mage | SalesRule | salesrule_validator_process | array(‘rule’ => $rule,’item’ => $item,’address’ => $address,’quote’ => $quote,’qty’ => $qty,’result’ => $result,) |
Mage | SalesRule | sales_quote_address_discount_item | $eventArgs |
Mage | SalesRule | sales_quote_address_discount_item | $eventArgs |
Mage | SalesRule | salesrule_rule_condition_combine | array(‘additional’ => $additional) |
Mage | Sendfriend | sendfriend_product | array(‘product’ => $product) |
Mage | Tag | tag_tag_product_collection_load_after | array(‘collection’ => $this) |
Mage | Tax | tax_rate_data_fetch | array(‘request’=>$this) |
Mage | Tax | tax_settings_change_after’ | |
Mage | Tax | tax_settings_change_after’ | |
Mage | Tax | tax_settings_change_after’ | |
Mage | Tax | tax_settings_change_after’ | |
Mage | Tax | tax_settings_change_after’ | |
Mage | Wishlist | wishlist_add_product | array(‘wishlist’=>$wishlist, ‘product’=>$product) |
Mage | Wishlist | wishlist_share | array(‘wishlist’=>$wishlist) |
以一个事件为列
比如,当后台更新或新增产品图片时,希望能生成一个自定义尺寸的缩略图。一般做法是,修改产品的save方法。
但是Magento事件模型机制提供了另外一个选择。当产品存储之前,Magento抛出名字为catalog_product_prepare_save的事件,我们只要在自己的模块中捕获这个事件就可以了。。
首先在config.xml中添加:
<config>
<global>
<events>
<catalog_product_prepare_save>
<observers>
<cartz_catalog_image_observer>
<type>singleton</type>
<class>manager/image_observer</class>
<method>zoom_out_to_middle_size</method>
</cartz_catalog_image_observer>
</observers>
</catalog_product_prepare_save>
</events>
</global>
<config>
然后创建你的observer类:
<?php
class Cartz_Manager_Model_Image_Observer{
public function __construct(){
}
public function zoom_out_to_middle_size($observer){
$event = $observer->getEvent();
$product = $event->getProduct();
$imageFullPath =
Mage::getBaseDir(‘media’).DS.’catalog’.DS.’product’
. $product->getImage();
$imageFullPath = preg_replace(‘///’, DS,
$imageFullPath);
$cartzImage = Mage::getModel(‘manager/image_zoom’,
$imageFullPath);
$filename = $cartzImage->resize();
$product->setMiddleImage($filename);
return $this;
}
}
其中上述代码function zoom_out_to_middle_size ( $observer ),中参数 $observer,就是对应表格中“事件参数”这一栏,可以清楚的看到catalog_product_prepare_save事件中的“事件参数
发表评论
-
Magento: Overriding Core Files (Blocks, Models, Resources, Controllers)
2013-04-07 11:03 1009When building custom module ... -
Magento模板及布局文件中引用Static Block的方法
2013-03-21 10:25 1287Static Block是Magento提供的非常实用的一种 ... -
Magento2, 我们在等你
2013-03-07 10:49 1252文章前面我要说明,Magento2.0和1.X是完全不同的 ... -
magento admin form 表单元素大全
2013-03-05 11:01 9531.input type=”t ... -
magento几种全页缓冲加速Full Page Cache插件试用心得
2013-03-04 23:47 4033magento的速度确实比较慢,但有全页缓冲,速度很快的由于 ... -
magento开发必备插件列表汇总
2013-02-22 13:27 2659magento和wordpress一样,因为开放而倍加优秀 ... -
Magento 常用技巧与方法
2012-08-01 14:46 13081:获取session $session = Mage:: ... -
Magento - 返回不带Layout的页面输出
2012-07-26 17:47 1075你至少有三种方法可以返回不带Layout的页面输出 1. ... -
Magento获取文件路径函数(参考大全)
2012-05-30 15:46 1539假设网站根目录为:E:\www\magentoeye.com\ ...
相关推荐
Magento事件清单及参数详解 #### 2.1 `admin_session_user_login_success` 当管理员登录成功时触发。参数`$user`包含了登录用户的对象,可用于获取用户的具体信息,如用户名、权限等。 #### 2.2 `admin_session_...
### Magento 事件速查表详解 #### 概述 Magento 是一个广受欢迎的开源电子商务平台,为开发者提供了高度可定制性和灵活性。为了更好地利用 Magento 的功能进行模块开发或扩展,理解其事件系统至关重要。本篇文章将...
magento事件列表,英文版,做监听用的到
**SYSTEMLOGS**, **DATAFLOW**, **EAVENTITYTYPE**, **EAVATTRIBUTE**:这些表涉及标签管理、系统布局、API接口、目录管理、事件报告、系统日志、数据流控制、实体类型定义和属性定义,共同支持了Magento系统的全面...
在电商领域,经常会有需求将一个已经建立并运行良好的Magento站点快速复制到另一个服务器,用于测试、备份或者创建一个新的独立站点。这个过程涉及到数据库的备份与还原、文件系统的复制以及配置的调整等多个步骤。 ...
10. **事件处理**:使用Magento的事件观察者机制来响应系统中的特定事件。 11. **后端开发**:设计和实现插件的后端界面,包括配置、列表视图和编辑表单。 ### 高级主题 - **信任插件开发**:了解如何创建受信任的...
3. 核心概念理解:详细介绍Magento中的核心概念,如实体属性(EAV)模型、事件/观察者模式、依赖注入等,这些都是开发Magento模块不可或缺的基础知识。 4. 模块开发:深入探讨如何创建和开发Magento模块,模块是...
其次,Magento的事件观察者机制是其灵活性的一个体现。通过监听系统中的特定事件,开发者可以无侵入地扩展或修改系统行为。例如,你可以创建一个观察者来在订单保存时自动执行某些操作,如发送自定义邮件或更新库存...
Magento是一款强大的开源电子商务平台,以其高度可定制性和灵活性著称。在进行Magento的二次开发时,你需要理解并掌握以下几个核心概念和技术: 1. **MVC架构**:Magento基于Model-View-Controller(MVC)设计模式...
Magento 1.9.0.1 是一个流行的开源电子商务平台,专为在线商家提供高度定制化和功能丰富的购物体验。这个版本是Magento的早期稳定版本,具有多项改进和增强的功能,旨在提高性能、安全性和用户体验。 一、Magento ...
Magento是一款强大的开源电子商务平台,由Varien公司开发,并在2008年首次发布。它以其高度可定制性、丰富的功能集以及灵活的架构而受到全球电商从业者的广泛青睐。这款网店系统的出现,为中小型企业提供了与大型...
Magento是开源的电子商务平台,广泛用于在线商店的建设。SMTP(Simple Mail Transfer Protocol)是用于发送电子邮件的标准协议。在Magento中,SMTP插件扮演着关键角色,它允许商家通过更安全、可靠的SMTP服务器发送...
这个“magento-java-master.zip_magento”压缩包可能是为了提供一个Java连接Magento源码的示例或者库,帮助开发者实现Java与Magento系统的交互。 在Java中与Magento进行交互通常涉及到以下几个关键知识点: 1. **...
Magento是一款强大的开源电子商务平台,以其高度可定制性和灵活性著称。作为一款基于PHP开发的系统,它为商家提供了丰富的功能,包括商品管理、订单处理、客户管理、营销工具等。以下将详细介绍`magento入门学习资料...
Magento是一款开源的电子商务平台,专为在线商家设计,提供强大的购物车系统和丰富的功能。"Magik Shoes Magento 模板"是专为Magento 1.7版本设计的商店主题,旨在提升在线鞋类销售商店的用户体验和视觉吸引力。在这...
根据给定文件信息,以下为《Magento 2 Developer's Cookbook》一书中的知识点介绍。 首先,《Magento 2 Developer's Cookbook》是一本针对Magento 2开发的指导手册,它向开发者提供了实用的食谱来解决在Magento 2...
3. **获取Magento代码**:你可以从Magento官网下载最新版本的源码,或者通过Composer拉取Magento 2的代码。 4. **解压并上传**:将下载的Magento源码解压到Web服务器的根目录,例如 `/var/www/html`。 5. **运行...
此外,Magento的事件观察者机制也可能在产品预览中发挥作用。开发者可以通过监听特定的事件,比如`catalog_product_view`,并在对应的事件处理函数中实现预览功能。这可以在`app/code`目录下的`etc/config.xml`文件...
Magento是一款强大的开源电子商务平台,它的灵活性和可扩展性使得开发者能够根据需求定制各种功能。在电商网站中,图片是至关重要的元素,它们可以展示产品细节,吸引顾客注意力。然而,大量的图片也会对网站性能...