{"id":1704,"date":"2021-04-12T04:10:31","date_gmt":"2021-04-12T04:10:31","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/use-checkout-type-multishipping-create-orders-single-event-in-magento-2\/"},"modified":"2025-07-16T18:17:21","modified_gmt":"2025-07-16T12:47:21","slug":"use-checkout-type-multishipping-create-orders-single-event-in-magento-2","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/use-checkout-type-multishipping-create-orders-single-event-in-magento-2\/","title":{"rendered":"How to Use &#8220;checkout_type_multishipping_create_orders_single&#8221; Event in Magento 2"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In a Magento 2 store, the admin may want to configure multiple shipping addresses that allows customers to have their orders delivered to more than one address on the checkout page. Admin may need to add a custom field in multi shipping of the checkout page in\u00a0Magento 2\u00a0store, i.e., Extra Fee.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">While adding a custom field, it requires adding its value to the sales_order_table to validate that value. In that case, you need to override the event and observer.&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/magento-2-events\/\" target=\"_blank\" rel=\"noreferrer noopener\">Events<\/a>&nbsp;in Magento 2 are dispatched based on an action performed, and it passes data to the observer. Observers are Magento classes that are executed when an event is dispatched.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In that scenario, you need to&nbsp;<strong><em>use \u201ccheckout_type_multishipping_create_orders_single\u201d event in Magento 2<\/em><\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Method&nbsp;to Use \u201ccheckout_type_multishipping_create_orders_single\u201d Event in Magento 2<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">1. Create&nbsp;<strong>event.xml&nbsp;<\/strong>file at&nbsp;<strong><strong><strong><strong>Vendor\\Module\\etc<\/strong><\/strong><\/strong><\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;config xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\n        xsi:noNamespaceSchemaLocation=\"urn:magento:framework:Event\/etc\/events.xsd\">\n    &lt;event name=\"checkout_type_multishipping_create_orders_single\">\n        &lt;observer name=\"surcharge_to_order_multi\" instance=\"Vendor\\Module\\Observer\\MultiSurchargeOrder\"\/>\n    &lt;\/event>\n&lt;\/config><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">2. Create&nbsp;<strong>MultiSurchargeOrder.php<\/strong>&nbsp;file at&nbsp;<strong><strong><strong><strong>Vendor\\Module\\Observer<\/strong><\/strong><\/strong><\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?php\n\nnamespace Vendor\\Module\\Observer;\n\nuse Magento\\Framework\\Event\\Observer;\nuse Magento\\Framework\\Event\\ObserverInterface;\n\nclass MultiSurchargeOrder implements ObserverInterface\n{\n    public function execute(Observer $observer)\n    {\n        \/\/ here you can add code to save in order tabel at time multi shippinging place order\n    }\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Follow these steps and enhance the customer experience!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Feel free to share the solution with Magento Community via social media.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank You.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In a Magento 2 store, the admin may want to configure multiple shipping addresses that allows customers to have their orders delivered to more than&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-1704","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1704","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=1704"}],"version-history":[{"count":5,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1704\/revisions"}],"predecessor-version":[{"id":18135,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1704\/revisions\/18135"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=1704"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=1704"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=1704"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}