Cart - Use permalinks to pre-load the cart

Topic summary

Cart permalinks allow pre-loading Shopify carts with specific products and quantities using URLs formatted as /cart/{variant_id}:{quantity}. The original tutorial explains this advanced technique can pre-fill checkout fields (email, shipping address) and include discount codes, though it’s unsupported by Shopify and requires technical knowledge.

Key URL patterns discovered:

  • Add to cart without redirect: /cart/add?id[]=variantid
  • Update quantities: /cart/update?updates[variant_id]=qty
  • Clear cart then add items: /cart/update?updates[variant_id]=0&updates[variant_id]=3
  • Apply discount and redirect: /cart/add?id[]=variant&return_to=/discount/code?redirect=/page

Common issues resolved:

  • Multiple query parameters require & not ? as separators
  • Must use variant IDs (not product IDs)
  • Encoding & as %26 needed when chaining parameters in return_to URLs
  • Province/state uses two-letter codes: &checkout[shipping_address][province]=NY

Unresolved questions:

  • Adding tags to orders via permalink (not currently supported)
  • Adding line item properties through URLs
  • Adding metafields
  • Applying discount codes to cart page (only works on checkout)

The discussion remains active with ongoing troubleshooting and workaround sharing.

Summarized with AI on October 31. AI used: claude-sonnet-4-5-20250929.

There are different URL formats referenced in this thread. Some of them will replace the contents of the cart and some of them will just modify the existing cart. Which version did you use?