magenxcommerce/module-wishlist

N/A

安装: 126

依赖项: 10

建议者: 0

安全: 0

星星: 0

观察者: 1

分支: 0

公开问题: 0

类型:magento2-module

101.2.3-p1 2021-10-20 05:23 UTC

README

The Magento_Wishlist 模块实现了愿望单功能。

此模块允许客户创建一个产品列表,他们可以将这些产品添加到购物车中,稍后购买,或与朋友分享。

安装详细信息

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

  • Magento_Captcha
  • Magento_Catalog
  • Magento_Customer

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

  • Magento_WishlistAnalytics

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

结构

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

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

可扩展性

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

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

事件

模块调用以下事件

  • \Magento\Wishlist\Block\Customer\Wishlist\Item\Options::_construct()方法中的product_option_renderer_init事件。参数
    • block是愿望单块客户项(\Magento\Wishlist\Block\Customer\Wishlist\Item\Options类)。
  • \Magento\Wishlist\Model\Rss\Wishlist::getRssData()方法中的rss_wishlist_xml_callback事件。参数
    • $args是产品对象数组(\Magento\Catalog\Model\Product类)。
  • \Magento\Wishlist\Model\Wishlist::addItem()方法中的wishlist_add_item事件。参数
    • item是项对象(\Magento\Wishlist\Model\Item类)。
  • \Magento\Wishlist\Controller\Index\Add::execute()方法中的wishlist_add_product事件。参数
    • wishlist是愿望单对象(\Magento\Wishlist\Model\Wishlist类)。
    • product是产品对象(\Magento\Catalog\Api\Data\ProductInterface类)。
    • item是项对象(\Magento\Wishlist\Model\Item类)。
  • \Magento\Wishlist\Model\ResourceModel\Item\Collection::_assignProducts()方法中的wishlist_item_collection_products_after_load事件。参数
    • product_collection是产品集合对象(\Magento\Catalog\Model\ResourceModel\Product\Collection类)。
  • \Magento\Wishlist\Helper\Data::calculate()方法中的wishlist_items_renewed事件。
  • \Magento\Wishlist\Model\Wishlist::addNewItem()方法中的wishlist_product_add_after事件。参数
    • items是项对象数组(\Magento\Wishlist\Model\Item类)。
  • \Magento\Wishlist\Controller\Index\Send::execute()方法中的wishlist_share事件。参数
    • wishlist是愿望单对象(\Magento\Wishlist\Model\Wishlist类)。
  • \Magento\Wishlist\Controller\Index\UpdateItemOptions::execute()方法中的wishlist_update_item事件。参数
    • 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
    • 客户账户
    • 默认
    • 愿望单电子邮件商品
    • 愿望单电子邮件RSS
    • 愿望单索引配置
    • 愿望单索引配置类型捆绑
    • 愿望单索引配置类型可配置
    • 愿望单索引配置类型可下载
    • 愿望单索引配置类型分组
    • 愿望单索引配置类型简单
    • 愿望单索引索引
    • 愿望单索引共享
    • wishlist_shared_index.xml

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

UI组件

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

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

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