|
|
před 2 roky | |
|---|---|---|
| .. | ||
| Api | před 2 roky | |
| Block | před 2 roky | |
| Helper | před 2 roky | |
| Model | před 2 roky | |
| Observer | před 2 roky | |
| Setup/Patch/Data | před 2 roky | |
| Test | před 2 roky | |
| Ui/DataProvider/Product/Modifier | před 2 roky | |
| etc | před 2 roky | |
| i18n | před 2 roky | |
| view | před 2 roky | |
| LICENSE.txt | před 2 roky | |
| LICENSE_AFL.txt | před 2 roky | |
| README.md | před 2 roky | |
| composer.json | před 2 roky | |
| registration.php | před 2 roky | |
This module allows to add a message to order or to each ordered item either on frontend or backend.
Before installing this module, note that the Magento_GiftMessage is dependent on the following modules:
Magento_CatalogMagento_SalesMagento_QuoteBefore disabling or uninstalling this module, note that the Magento_GiftMessageGraphQl module depends on this module
The Magento_GiftMessage module creates the gift_message table in the database.
This module modifies the following tables in the database:
quote - adds column gift_message_idquote_address - adds column gift_message_idquote_item - adds column gift_message_idquote_address_item - adds column gift_message_idsales_order - adds column gift_message_idsales_order_item - adds columns gift_message_id and gift_message_availableFor information about a module installation in Magento 2, see Enable or disable modules.
Extension developers can interact with the Magento_GiftMessage module. For more information about the Magento extension mechanism, see Magento plugins.
The Magento dependency injection mechanism enables you to override the functionality of the Magento_GiftMessage module.
A lot of functionality in the module is on JavaScript, use mixins to extend it.
The module dispatches the following events:
gift_options_prepare_items event in the \Magento\GiftMessage\Block\Message\Inline::getItems method. Parameters:
items is a entityItems (array type)gift_options_prepare event in the \Magento\GiftMessage\Block\Message\Inline::isMessagesOrderAvailable method. Parameters:
entity is an entity objectFor information about an event in Magento 2, see Events and observers.
This module introduces the following layouts in the view/frontend/layout and view/adminhtml/layout directories:
view/adminhtml/layout:
sales_order_create_indexsales_order_create_load_block_datasales_order_create_load_block_itemssales_order_viewview/frontend/layout:
checkout_cart_indexcheckout_cart_item_renderersFor more information about a layout in Magento 2, see the Layout documentation.
Magento\GiftMessage\Api\Data\MessageInterface
\Magento\GiftMessage\Api\CartRepositoryInterface
\Magento\GiftMessage\Api\GuestCartRepositoryInterface
\Magento\GiftMessage\Api\GuestItemRepositoryInterface
\Magento\GiftMessage\Api\ItemRepositoryInterface
\Magento\GiftMessage\Api\OrderItemRepositoryInterface
\Magento\GiftMessage\Api\OrderItemRepositoryInterface
For information about a public API in Magento 2, see Public interfaces & APIs.