less than a minute read • Updated 5 hours ago
Set up multiple shipping addresses
How to enable multiple shipping addresses (multi-ship) and add a ship-to selector to your products.
Setting up multi-ship takes two steps: enable it in your store settings, then add a shipto selector to your products so customers can choose a destination for each item. For what multi-ship does and how it changes the checkout, see Multi-ship overview.
Step 1: Enable multi-ship
Step 2: Add a ship-to selector to your products
Add a shipto field to your add to cart form. The customer's selected value assigns that product to a destination. For example:
html
<form action="https://YOURDOMAIN.foxycart.com/cart" method="post">
<input type="hidden" name="code" value="CCCOOKIES">
<input type="hidden" name="name" value="Chocolate Chip Cookies">
<input type="hidden" name="price" value="10.00">
<label>Ship to:</label>
<select name="shipto">
<option value="Me">Me</option>
<option value="Mom">Mom</option>
<option value="Friend">Friend</option>
</select>
<input type="submit" value="Add to cart">
</form>Add the same product twice with different shipto values (for example "Me" and "Mom") to see the cart group them under separate destinations.
Letting customers enter their own addresses
Hard coding destination names like the example above works for testing, but most stores want customers to name their own destinations. You can use JavaScript to let customers add custom shipto values and have the selector remember them across products, so the destination list stays consistent throughout the cart.
Notes
A product's
shiptovalue can't be changed once it's in the cart. To reassign an item, remove it and add it again with the new destination.Each destination is rated separately using your store's shipping configuration, so every address in the cart gets its own shipping options and subtotal.