In this topic we will show you How to Change Shippable Order Item Qty in Magento 2 through 2 steps

  • Step 1: Create new columns on sales_order_item table
  • Step 2: Define plugin in di.xml
  • Step 3: Rewrite getSimpleQtyToShip() function
 Change Shippable Order Item Qty
Change Shippable Order Item Qty

Step 1: Create new columns on sales_order_item table

In this example, we will create qty_preapreship column in sales_order_item table

File directory: app/code/Magestore/OrderSuccess/Setup/InstallSchema.php

Step 2: Define plugin in di.xml

File directory: app/code/Magestore/OrderSuccess/etc/di.xml

Step 3: Rewrite getSimpleQtyToShip() function

File directory: app/code/Magestore/OrderSuccess/Plugin/AfterGetSimpleQtyToShip.php

From now, item to ship will be calculated with qty_prepareship.

The 2 steps I mention above is the shortest process for you to Change Shippable Order Item Qty  in Magento 2. With this guide, you can manage the Shippable Order Item Qty in Magento 2 easily. Every store has a Shippable Order Item Qty in Magento 2 with many attributes.

Thank you for reading this post and see you in other posts from Magestore!

We also contribute great content of Magento Download for FREE (all versions)

DON'T MISS THE CHANCE!

magento download

How to Create Shipment Programmatically in Magento 2
How to Configure UPS Carrier in Magento 2

Leave a Reply

Your email address will not be published. Required fields are marked *