I want to create the Shopify url to add multiple SKUs, apply a discount code, have utm parameters AND redirect to /cart NOT /checkout.
By the way, I stick to URL to solve the issue. I know Script Editor can block coupon and create discount on specific products. However I don't want to use ScriptEditor instead of coupon code because I don't want customers to use some discount codes in addition to ScriptEditor discount.
Based on the articles below, I could create the URL which achives
- add multiple items
- apply discount code or leads to /cart
- set utm parameter
examples (1)This skips /cart and goes to /checkout (please remove [] when you try)
https://[yourdomain.com]/cart/[variants_id1]:1,[variants_id2]:1?discount=[discount_code]&utm_campaign=spot_email
(2)This leads to /cart but does NOT apply a discount code (please remove 【】 when you try)
https://【yourdomain.com】/cart/add?id[]=【variant_id1】&id[]=【variant_id2】&quantity[]=1&quantity[]=1&discount=【discount_code】&utm_campaign=spot_email ※please remove 【】 when you try
Does anyone know a URL scheme for that?
※articles Shopify community article, Stack overflow artile
I've looked far and wide to get UTM's to attach during the cart, but I haven't found a solution. However, if you're looking to get a discount attached to /cart, here's your solution:
https://shopifyurl.com/discount/SAVE15?redirect=/cart/add?id=variant1&id=variant2
Adding UTM's to the end of it will just be removed after the items get added and the redirection kicks in. I found a thread in Shopify about someone being able to achieve this with an app called ZipLink. (I have not tested so good luck)
Hope Shopify implements a fix the future.