I would be happy to help.
Something went wrong.
Never miss Magento tips, tricks, tutorials, and news.
Method to Use “checkout_type_multishipping_create_orders_single” Event in Magento 2
- Create event.xml file at VendorModuleetc
<config xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”xsi:noNamespaceSchemaLocation=“urn:magento:framework:Event/etc/events.xsd”><event name=“checkout_type_multishipping_create_orders_single”><observer name=“surcharge_to_order_multi” instance=“VendorModuleObserverMultiSurchargeOrder”/></event>
- Create MultiSurchargeOrder.php file at VendorModuleObserver
namespace VendorModuleObserver;use MagentoFrameworkEventObserver;use MagentoFrameworkEventObserverInterface;class MultiSurchargeOrder implements ObserverInterfacepublic function execute(Observer $observer)// here you can add code to save in order tabel at time multi shippinging place order
Thank you for subscribing.
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 Magento 2 store, i.e., Extra Fee.
Doubts will be entertained in the Comments section below. Also, let me know how have you used this order data for the betterment.
Follow these steps and enhance the customer experience!
Get Weekly Updates
Feel free to share the solution with Magento Community via social media.
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. Events 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.
In that scenario, you need to use “checkout_type_multishipping_create_orders_single” event in Magento 2.