# MultiShip

# How to create a Multiship order in backend

**Step 1: In backend; navigate to `Orders`. Click `New Orders`. Choose a customer**

[![image.png](https://frdocs.socalappsolutions.com/uploads/images/gallery/2024-07/scaled-1680-/image.png)](https://frdocs.socalappsolutions.com/uploads/images/gallery/2024-07/image.png)

**Step 2: Click button `Switch to Multiship`**

Then click `Add Products` and add a few products to the order.   
Then click `Add Recipient` to add a new shipping address:

[![image.png](https://frdocs.socalappsolutions.com/uploads/images/gallery/2024-07/scaled-1680-/ec6image.png)](https://frdocs.socalappsolutions.com/uploads/images/gallery/2024-07/ec6image.png)

**Step 3: Add shipping addresses**

In the popup the add new recipient, choose an existing address; or add new address. Click Get Shipping Methods And Rates and confirm the shipping method. When done, click `Save Recipient`.  
After adding a new recipient, choose quantities for each products. When done, click button `Update Recipients and Items`. And choose a payment method

[![image.png](https://frdocs.socalappsolutions.com/uploads/images/gallery/2024-07/scaled-1680-/qdXimage.png)](https://frdocs.socalappsolutions.com/uploads/images/gallery/2024-07/qdXimage.png)

Step 3b: Upload recipients  
Admin can also upload recipients using a csv file. Click button Upload Recipients

[![image.png](https://frdocs.socalappsolutions.com/uploads/images/gallery/2025-01/scaled-1680-/image.png)](https://frdocs.socalappsolutions.com/uploads/images/gallery/2025-01/image.png)

Then choose a csv file from your computer; and click `Add Recipients`  
Note that upload recipients will wipe out all existing QAs.

  
  
Click `Submit Order` to create the order.

Confirm the order is created, and its status should be `New`. In the `Orders` grid; the column `Multiship` is Yes

[![image.png](https://frdocs.socalappsolutions.com/uploads/images/gallery/2024-07/scaled-1680-/MqHimage.png)](https://frdocs.socalappsolutions.com/uploads/images/gallery/2024-07/MqHimage.png)

# DEV Create MS in BE

Dev note: Backend create MS order

Button `Update Recipients and Items` : Frans/MultiShip/view/adminhtml/templates/order/create/multiship/shipping\_assignments.phtml

```
$block->getButtonHtml(__('Update Recipients and Items'), 'order.updateQuoteAddressItems(),order.itemsUpdate()',
```

Click handler is located at Frans/MultiShip/view/adminhtml/web/js/order/create/scripts-multiship.js, function updateQuoteAddressItems

Upload Recipients:  
Most logics and validations are in `app/code/Frans/MultiShip/Controller/Adminhtml/Shipment/UploadRecipients.php`

# How to create Credit Memo per specific shipping address

In Magento, a Creditmemo can be assigned to a specific shipping address. This guide shows how we perform credit memo per shipping address.

1/ Create a MS order. For example, create a MS order has 2 quote addresses (QA)

2/ Ship the two QA. Print the label. Click button `Daily Ship and Capture` to generate the invoice

3/ Now that the MS order is invoiced, go to BE MS order. Each shipped quote address should have a `Credit Memo` button:

[![image.png](https://frdocs.socalappsolutions.com/uploads/images/gallery/2024-10/scaled-1680-/image.png)](https://frdocs.socalappsolutions.com/uploads/images/gallery/2024-10/image.png)

4/ Click the button `Credit Memo` to create a new credit memo for QA 5591:

[![image.png](https://frdocs.socalappsolutions.com/uploads/images/gallery/2024-10/scaled-1680-/qDHimage.png)](https://frdocs.socalappsolutions.com/uploads/images/gallery/2024-10/qDHimage.png)

Verify that the New Memo page shows the correct shipment # and Quote Address number

5/ Verify Qty and Subtotal of items:

[![image.png](https://frdocs.socalappsolutions.com/uploads/images/gallery/2024-10/scaled-1680-/AODimage.png)](https://frdocs.socalappsolutions.com/uploads/images/gallery/2024-10/AODimage.png)

Only items and Qty of the selected QA 5591 is shown. Click button `Refund Offline` to create Credit Memo.

6/ Verify that the Order now does reflect the refunded Qty and Amount:

[![image.png](https://frdocs.socalappsolutions.com/uploads/images/gallery/2024-10/scaled-1680-/lFBimage.png)](https://frdocs.socalappsolutions.com/uploads/images/gallery/2024-10/lFBimage.png)

7/ When all shipments of the order have been refunded, the order is automatically closed.

# Front end Multiship

To enable Multiship in FrontEnd, first we need to enable it in config:

Under Frans' Module , Multiship, Enable Front End Multiship, select Enable:

[![image.png](https://frdocs.socalappsolutions.com/uploads/images/gallery/2024-12/scaled-1680-/image.png)](https://frdocs.socalappsolutions.com/uploads/images/gallery/2024-12/image.png)

Click `Save Config`.

  
  
During Front-End checkout, log in, and button `Ship to Multiple Addresses` will be shown:

[![image.png](https://frdocs.socalappsolutions.com/uploads/images/gallery/2024-12/scaled-1680-/Ufiimage.png)](https://frdocs.socalappsolutions.com/uploads/images/gallery/2024-12/Ufiimage.png)  
  
  
Multi-ship front end checkout will be shown:

[![image.png](https://frdocs.socalappsolutions.com/uploads/images/gallery/2024-12/scaled-1680-/iAeimage.png)](https://frdocs.socalappsolutions.com/uploads/images/gallery/2024-12/iAeimage.png)

# Cron job to create partial invoice and send email of MS orders

First of all, configure cron schedule in Config --&gt; Frans --&gt; MultiShip --&gt; Cron Settings

[![image.png](https://frdocs.socalappsolutions.com/uploads/images/gallery/2025-01/scaled-1680-/vZhimage.png)](https://frdocs.socalappsolutions.com/uploads/images/gallery/2025-01/vZhimage.png)

  
Then execute ./bin/magento cron:run  
Make sure table `cron\_schedule` has rows with job\_code='multiship\_shipment\_email\_cron'

Each cron execution will create logging rows into table `frans\_ship\_email\_log`

\_\_\_\_\_

To debug the cron:  
  
1/ Sql to find shipments not invoiced:

```
SELECT *,shipment_status from sales_shipment<br></br>where invoice_id IS NULL AND ms_email_sent_at IS NULL AND created_at > date_sub(now(),INTERVAL 3 day)<br></br>and shipment_status in (4,11)<br></br>
```