Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hello, we are creating a link to apply a discount and then redirect the user to the cart and add 2 products, but we are having a problem because it is adding just 1 product.
Do you have an idea how to solve that? thank you
this is the url:
your-store/discount/FREECODE?redirect=/cart/add?id[]=VARIANT1ID&quantity=1&id[]=VARIANT2ID&quantity=1
theres a better way to use permalinks
For non technical people (especially as its difficult to find the variant id's) we made a tool you can add to your site to easily create permalinks
See our youtube explainer - https://www.youtube.com/watch?v=3X33Iwu4PjE
See https://onescales.com/blogs/main/shopify-pre-loaded-cart