Magento_Wishlist module
This 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.
Installation details
Before installing this module, note that this module is dependent on the following modules:
- Magento_Captcha
- Magento_Catalog
- Magento_Customer
Before disabling or uninstalling this module, note the following dependencies:
- Magento_WishlistAnalytics
Refer to how to enable or disable modules in Magento 2.
Structure
Pricing/ - the directory that contain solutions for configurable and downloadable product price.
For information about a typical file structure of a module, see Module file structure.
Extensibility
Extension developers can interact with this module. For more information about the extension mechanism, see Plugins.
The dependency injection mechanism enables you to override the functionality of this module.
Events
The module dispatches the following events:
-
product_option_renderer_initevent in the\Magento\Wishlist\Block\Customer\Wishlist\Item\Options::_construct()method. Parameters:blockis a Wishlist block customer items (\Magento\Wishlist\Block\Customer\Wishlist\Item\Optionsclass).
-
rss_wishlist_xml_callbackevent in the\Magento\Wishlist\Model\Rss\Wishlist::getRssData()method. Parameters:$argsis a array of product object (\Magento\Catalog\Model\Productclass).
-
wishlist_add_itemevent in the\Magento\Wishlist\Model\Wishlist::addItem()method. Parameters:itemis an item object (\Magento\Wishlist\Model\Itemclass).
-
wishlist_add_productevent in the\Magento\Wishlist\Controller\Index\Add::execute()method. Parameters:wishlistis a Wishlist object (\Magento\Wishlist\Model\Wishlistclass).productis a product object (\Magento\Catalog\Api\Data\ProductInterfaceclass).itemis an item object (\Magento\Wishlist\Model\Itemclass).
-
wishlist_item_collection_products_after_loadevent in the\Magento\Wishlist\Model\ResourceModel\Item\Collection::_assignProducts()method. Parameters:product_collectionis a product collection object (\Magento\Catalog\Model\ResourceModel\Product\Collectionclass).
-
wishlist_items_renewedevent in the\Magento\Wishlist\Helper\Data::calculate()method. -
wishlist_product_add_afterevent in the\Magento\Wishlist\Model\Wishlist::addNewItem()method. Parameters:itemsis an array of item object (\Magento\Wishlist\Model\Itemclass).
-
wishlist_shareevent in the\Magento\Wishlist\Controller\Index\Send::execute()method. Parameters:wishlistis a Wishlist object (\Magento\Wishlist\Model\Wishlistclass).
-
wishlist_update_itemevent in the\Magento\Wishlist\Controller\Index\UpdateItemOptions::execute()method. Parameters:wishlistis a Wishlist object (\Magento\Wishlist\Model\Wishlistclass).productis a product object (\Magento\Catalog\Api\Data\ProductInterfaceclass).itemis an item object (\Magento\Wishlist\Model\Itemclass).
For information about the event, see Events and observers.
Layouts
This module introduces the following layouts and layout handles in the directories:
-
view/adminhtml/layout:customer_index_wishlist
-
view/base/layout:catalog_product_prices
-
view/frantend/layout:catalog_category_viewcatalog_product_viewcatalogsearch_advanced_resultcheckout_cart_indexcheckout_cart_item_rendererscustomer_accountdefaultwishlist_email_itemswishlist_email_rsswishlist_index_configurewishlist_index_configure_type_bundlewishlist_index_configure_type_configurablewishlist_index_configure_type_downloadablewishlist_index_configure_type_groupedwishlist_index_configure_type_simplewishlist_index_indexwishlist_index_sharewishlist_shared_index.xml
For more information about a layout, see the Layout documentation.
UI components
You can extend a customer form and widgets using the configuration files located in the directories
-
view/base/ui_component:customer_form
-
view/frontend/ui_component:widget_recently_comparedwidget_recently_viewed
For information about a UI component, see Overview of UI components.
data-slots=text