CommerceForz

Multiple Product Variants to Cart with a One Button click in Shopify

  • Vivek Antony
  • Last Updated - May, 2025

When running a Shopify store with products that have multiple variants — like sizes, colors, or materials — it’s often useful to let customers add several variants to their cart at once. This is particularly useful for those customers that don’t use bundles for various inventory and shipping related reasons. Shopify’s default setup only allows one variant per form submission.

In this guide, we are trying to explain how to build a Shopify form that submits multiple product variants at once using only Liquid and native HTML.

🌟 Why Use Multi-Variant Add-to-Cart?

Here are some real-world use cases:
• A customer wants to order a shirt in Small, Medium, and Large all at once, but setting up bundles is not an option due to various fulfilment and inventory management restrictions.
• B2B or wholesale stores offering custom bulk ordering from a large selection of available products/variants.

Instead of making customers add each variant to cart separately, we can let them select all variants via a checkbox for example and then allow them to add those to cart with one click. For this we are making use of Shopify Forms.

Shopify’s Native Multi-Item Form Format

Shopify allows adding multiple line items to the cart using this input structure:

blog-image

Shopify’s Form Format for Multiple Variants + Properties

To add multiple items to the cart with custom properties, use this format:

blog-image

How It Works

• Each items[x][id] sets the variant ID.
• Each items[x][quantity] tells Shopify how many of that variant to add.
• Each items[x][properties][Name] collects custom line item data (like engraving, size notes, initials, etc.).
• Only variants with quantity > 0 will be added.

Things to Keep in Mind

• Shopify will ignore any variants with quantity 0
• Inventory rules (e.g., stock limits) will still apply
• You can reuse this method for any product page

Conclusion

Adding multiple variants to the cart in one shot enhances usability and speeds up the shopping experience—especially for repeat or bulk buyers. And with Shopify's items[] form support, there's no need for JavaScript or apps.
You can copy and paste the code above into your Shopify theme, provided the DOM element naming conventions are intact and have this running in minutes.