Shopify-additional-items[i][id] not applied in standard add-to-cart flow

Short description of issue

shopify-additional-items[i][id] is ignored in the standard add-to-cart flow and only the primary variant is added to the cart

Reproduction steps

  1. Create a standard product form with a valid primary variant ID.
  2. Include shopify-additional-items[0][id] in the same form and set it to a valid secondary variant ID.
  3. Submit the form through the normal add-to-cart flow
  4. Inspect the resulting cart contents, only the primary variant is added. The secondary variant provided through shopify-additional-items[0][id] is not added.

Additional info

We are developing a theme extension that needs to append a secondary variant when the primary variant is added through the standard product form.

In our implementation, the product form submits the primary variant together with the new shopify-additional-items[i][id] form key, using a valid secondary variant ID. The add-to-cart action completes successfully, but the cart only contains the primary variant. The secondary variant passed through shopify-additional-items[i][id] is not added.

From our testing, this new form key appears to be recognized in accelerated checkout contexts, but not in the standard add-to-cart flow. We want to confirm whether that behavior is expected. If shopify-additional-items[i][id] is limited to accelerated checkout, we would like to know whether there is a supported form-based mechanism for adding an additional variant as part of the same standard add-to-cart submission.

What type of topic is this

General discussion

1 Like