test-magenx/module-wishlist

N/A

安装: 0

依赖者: 0

建议者: 0

安全: 0

星标: 0

关注者: 1

分支: 0

开放问题: 0

类型:magento2-module

101.2.3 2021-10-10 22:17 UTC

README

The Magento_Wishlist module implements the Wishlist functionality.

This module allows customers to create a list of products that they can add to their shopping cart to be purchased at a later date, or share with friends.

安装详情

在安装此模块之前,请注意,Magento_Wishlist 依赖于以下模块

  • Magento_Captcha
  • Magento_Catalog
  • Magento_Customer

在禁用或卸载此模块之前,请注意以下依赖项

  • Magento_WishlistAnalytics

有关如何在 Magento 2 中启用或禁用模块的说明,请参阅 如何启用或禁用模块

结构

Pricing/ - 包含可配置和可下载产品定价解决方案的目录。

有关模块典型文件结构的详细信息,请参阅 模块文件结构

可扩展性

扩展开发者可以与 Magento_Wishlist 模块交互。有关 Magento 扩展机制的更多信息,请参阅 Magento 插件

Magento 依赖注入机制 允许您覆盖 Magento_Wishlist 模块的功能。

事件

该模块在以下方法中派发以下事件

  • product_option_renderer_init 事件在 \Magento\Wishlist\Block\Customer\Wishlist\Item\Options::_construct() 方法中。参数
    • block 是客户物品的愿望单块(\Magento\Wishlist\Block\Customer\Wishlist\Item\Options 类)。
  • rss_wishlist_xml_callback 事件在 \Magento\Wishlist\Model\Rss\Wishlist::getRssData() 方法中。参数
    • $args 是产品对象数组(\Magento\Catalog\Model\Product 类)。
  • wishlist_add_item 事件在 \Magento\Wishlist\Model\Wishlist::addItem() 方法中。参数
    • item 是一个项目对象(\Magento\Wishlist\Model\Item 类)。
  • wishlist_add_product 事件在 \Magento\Wishlist\Controller\Index\Add::execute() 方法中。参数
    • wishlist 是愿望单对象(\Magento\Wishlist\Model\Wishlist 类)。
    • product 是一个产品对象(\Magento\Catalog\Api\Data\ProductInterface 类)。
    • item 是一个项目对象(\Magento\Wishlist\Model\Item 类)。
  • wishlist_item_collection_products_after_load 事件在 \Magento\Wishlist\Model\ResourceModel\Item\Collection::_assignProducts() 方法中。参数
    • product_collection 是产品集合对象(\Magento\Catalog\Model\ResourceModel\Product\Collection 类)。
  • wishlist_items_renewed 事件在 \Magento\Wishlist\Helper\Data::calculate() 方法中。
  • wishlist_product_add_after 事件在 \Magento\Wishlist\Model\Wishlist::addNewItem() 方法中。参数
    • items 是项目对象数组(\Magento\Wishlist\Model\Item 类)。
  • wishlist_share 事件在 \Magento\Wishlist\Controller\Index\Send::execute() 方法中。参数
    • wishlist 是愿望单对象(\Magento\Wishlist\Model\Wishlist 类)。
  • wishlist_update_item 事件在 \Magento\Wishlist\Controller\Index\UpdateItemOptions::execute() 方法中。参数
    • wishlist 是愿望单对象(\Magento\Wishlist\Model\Wishlist 类)。
    • product 是一个产品对象(\Magento\Catalog\Api\Data\ProductInterface 类)。
    • item 是一个项目对象(\Magento\Wishlist\Model\Item 类)。

有关事件的详细信息,请参阅 事件和观察者

布局

该模块在以下目录中引入了以下布局和布局处理程序

  • view/adminhtml/layout:
    • customer_index_wishlist
  • view/base/layout:
    • catalog_product_prices
  • view/frantend/layout:
    • catalog_category_view
    • catalog_product_view
    • catalogsearch_advanced_result
    • checkout_cart_index
    • checkout_cart_item_renderers
    • customer_account
    • default
    • 愿望单邮件商品
    • 愿望单邮件RSS
    • 愿望单首页配置
    • 愿望单首页配置类型捆绑
    • 愿望单首页配置类型可配置
    • 愿望单首页配置类型可下载
    • 愿望单首页配置类型分组
    • 愿望单首页配置类型简单
    • 愿望单首页索引
    • 愿望单分享
    • 愿望单共享索引.xml

有关布局的更多信息,请参阅布局文档

UI组件

您可以使用位于以下目录的配置文件扩展客户表单和小部件:

  • view/base/ui_component:
    • customer_form
  • view/frontend/ui_component:
    • widget_recently_compared
    • widget_recently_viewed

有关UI组件的信息,请参阅UI组件概述