|
1 |
| -Magento\Multishipping module provides functionality that allows customer to request shipping to more than one address |
2 |
| -using different carriers. The module provides alternative to standard checkout flow. |
| 1 | +# Magento_Multishipping module |
| 2 | + |
| 3 | +**Magento_Multishipping** module provides functionality that allows customer to request shipping to more than one address |
| 4 | +using different carriers. The module provides alternative to standard checkout flow. |
| 5 | + |
| 6 | +## Installation |
| 7 | + |
| 8 | +For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html). |
| 9 | + |
| 10 | +## Structure |
| 11 | + |
| 12 | +For information about a typical file structure of a module in Magento 2, |
| 13 | + see [Module file structure](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/module-file-structure.html#module-file-structure). |
| 14 | + |
| 15 | + ## Extensibility |
| 16 | + |
| 17 | +Developers can interact with the module and change behaviour using type configuration feature. |
| 18 | + |
| 19 | +Namely, we can change `paymentSpecification` for `Magento\Multishipping\Block\Checkout\Billing` and `Magento\Multishipping\Model\Checkout\Type\Multishipping` classes. |
| 20 | +As result, we will get changed behaviour, new logic or something what our business need. |
| 21 | + |
| 22 | +For example: |
| 23 | +``` |
| 24 | +<type name="Magento\Multishipping\Model\Checkout\Type\Multishipping"> |
| 25 | + <arguments> |
| 26 | + <argument name="paymentSpecification" xsi:type="object">multishippingPaymentSpecification</argument> |
| 27 | + </arguments> |
| 28 | +</type> |
| 29 | +``` |
| 30 | +Yo can check this configuration and find more examples in the `etc/frontend/di.xml` file. |
| 31 | + |
| 32 | +More information about [type configuration](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/build/di-xml-file.html). |
| 33 | + |
| 34 | + |
| 35 | +Extension developers can interact with the Magento_Multishipping module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html). |
| 36 | + |
| 37 | +[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Msrp module. |
| 38 | + |
| 39 | +### Events |
| 40 | + |
| 41 | +This module observes the following event: |
| 42 | + |
| 43 | +`etc/frontend/` |
| 44 | + |
| 45 | + - `checkout_cart_save_before` in the `Magento\Multishipping\Observer\DisableMultishippingObserver` file. |
| 46 | + |
| 47 | +The module dispatches the following events: |
| 48 | + |
| 49 | +- `multishipping_checkout_controller_success_action` event in the |
| 50 | + class `\Magento\Multishipping\Controller\Checkout\Success::execute()` method. Parameters: |
| 51 | + - `order_ids` is order ids created during checkout |
| 52 | +- `checkout_controller_multishipping_shipping_post` event in the |
| 53 | + class `\Magento\Multishipping\Controller\Checkout\ShippingPost::execute()` method. Parameters: |
| 54 | + - `request` is a request object `Magento\Framework\App\RequestInterface`. |
| 55 | + - `quote` is a quote object for current checkout `Magento\Quote\Model\Quote`. |
| 56 | +- `checkout_type_multishipping_set_shipping_items` event in the |
| 57 | + class `\Magento\Multishipping\Model\Checkout\Type\Multishipping::setShippingItemsInformation()` method. Parameters: |
| 58 | + - `quote` is a quote object for current checkout `Magento\Quote\Model\Quote`. |
| 59 | +- `checkout_type_multishipping_create_orders_single` event in the |
| 60 | + class `\Magento\Multishipping\Model\Checkout\Type\Multishipping::createOrders()` method. Parameters: |
| 61 | + - `order` is a prepared order object for creating `\Magento\Sales\Model\Order`. |
| 62 | + - `address` is an address array. |
| 63 | + - `quote` is a quote object for current checkout `Magento\Quote\Model\Quote`. |
| 64 | +- `checkout_submit_all_after` event in the |
| 65 | + class `\Magento\Multishipping\Model\Checkout\Type\Multishipping::createOrders()` method. Parameters: |
| 66 | + - `orders` is order object array `\Magento\Sales\Model\Order` that was created. |
| 67 | + - `quote` is a quote object for current checkout `Magento\Quote\Model\Quote`. |
| 68 | +- `checkout_multishipping_refund_all` event in the |
| 69 | + class `\Magento\Multishipping\Model\Checkout\Type\Multishipping::createOrders()` method. Parameters: |
| 70 | + - `orders` is order object array `\Magento\Sales\Model\Order` that was created. |
| 71 | + |
| 72 | +For information about an event in Magento 2, see [Events and observers](http://devdocs.magento.com/guides/v2.3/extension-dev-guide/events-and-observers.html#events). |
| 73 | + |
| 74 | +### Layouts |
| 75 | + |
| 76 | +The module interacts with the following layout handles: |
| 77 | + |
| 78 | +`view/frontend/layout` directory: |
| 79 | + |
| 80 | + - `checkout_cart_index` |
| 81 | + |
| 82 | +This module introduces the following layouts and layout handles: |
| 83 | + |
| 84 | +`view/frontend/layout` directory: |
| 85 | + |
| 86 | + - `multishipping_checkout` |
| 87 | + - `multishipping_checkout_address_editaddress` |
| 88 | + - `multishipping_checkout_address_editbilling` |
| 89 | + - `multishipping_checkout_address_editshipping` |
| 90 | + - `multishipping_checkout_address_newbilling` |
| 91 | + - `multishipping_checkout_address_newshipping` |
| 92 | + - `multishipping_checkout_address_select` |
| 93 | + - `multishipping_checkout_address_selectbilling` |
| 94 | + - `multishipping_checkout_addresses` |
| 95 | + - `multishipping_checkout_billing` |
| 96 | + - `multishipping_checkout_customer_address` |
| 97 | + - `multishipping_checkout_login` |
| 98 | + - `multishipping_checkout_overview` |
| 99 | + - `multishipping_checkout_register` |
| 100 | + - `multishipping_checkout_results` |
| 101 | + - `multishipping_checkout_shipping` |
| 102 | + - `multishipping_checkout_success` |
| 103 | + |
| 104 | +## Additional information |
| 105 | + |
| 106 | +### ACL |
| 107 | + |
| 108 | +Module introduces the following resources: |
| 109 | + |
| 110 | +- `Magento_Multishipping::config_multishipping` - Multishipping Settings Section |
| 111 | + |
| 112 | +More information about [Access Control List rule](https://devdocs.magento.com/guides/v2.4/ext-best-practices/tutorials/create-access-control-list-rule.html). |
| 113 | + |
| 114 | +### Page Types |
| 115 | + |
| 116 | +Module introduces the new pages: |
| 117 | + |
| 118 | +`etc/frontend/page_types.xml` file. |
| 119 | + |
| 120 | +- `checkout_cart_multishipping` - Catalog Quick Search Form Suggestion |
| 121 | +- `checkout_cart_multishipping_address_editaddress` - Multishipping Checkout One Address Edit Form |
| 122 | +- `checkout_cart_multishipping_address_editbilling` - Multishipping Checkout Billing Address Edit Form |
| 123 | +- `checkout_cart_multishipping_address_editshipping` - Multishipping Checkout Shipping Address Edit Form |
| 124 | +- `checkout_cart_multishipping_address_newbilling` - Multishipping Checkout Billing Address Creation |
| 125 | +- `checkout_cart_multishipping_address_newshipping` - Multishipping Checkout Shipping Address Creation |
| 126 | +- `checkout_cart_multishipping_address_selectbilling` - Multishipping Checkout Billing Address Selection |
| 127 | +- `checkout_cart_multishipping_addresses` - Multishipping Checkout Address (Any) Form |
| 128 | +- `checkout_cart_multishipping_billing` - Multishipping Checkout Billing Information Step |
| 129 | +- `checkout_cart_multishipping_customer_address` - Multishipping Checkout Customer Address Edit Form |
| 130 | +- `checkout_cart_multishipping_login` - Multishipping Checkout Login User Form |
| 131 | +- `checkout_cart_multishipping_overview` - Multishipping Checkout Overview |
| 132 | +- `checkout_cart_multishipping_register` - Multishipping Checkout Register User Form |
| 133 | +- `checkout_cart_multishipping_shipping` - Multishipping Checkout Shipping Information Step |
| 134 | +- `checkout_cart_multishipping_success` - Multishipping Checkout Success |
| 135 | + |
| 136 | +More information about [layout types](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-types.html). |
| 137 | + |
| 138 | + |
| 139 | +For information about significant changes in patch releases, see [2.3.x Release information](http://devdocs.magento.com/guides/v2.3/release-notes/bk-release-notes.html). |
0 commit comments