Solved

Pre-load cart with subscription/plan products using permalinks

Jinxo
Tourist
3 0 3

Can permalink attributes be used to pre-load the cart with subscription/plan products? There's an option to include a product variant id, but can we include a plan id?

Accepted Solution (1)
Phillip_Malboeu
Shopify Partner
21 2 19

This is an accepted solution.

Hey @Jinxo and @saeba!

I believe I figured it out, this url will clear the cart, add items with a selling_plan and then redirect to checkout:
`https://{SHOP}.myshopify.com/cart/clear?return_to=/cart/add?items[][id]={VARIANT_ID}%26items[][quantity]={QUANTITY}%26items[][selling_plan]={SELLING_PLAN_ID}%26return_to=/checkout`

To head to the cart page instead of directly to checkout, you can remove the `%26return_to=/checkout`.

Cheers,
Phil

View solution in original post

Replies 50 (50)
JonasADDA
Shopify Partner
1 0 0

Hello Phillip thank you so much for your solution!! 

However i have a product withtout variant ... which id i can put in the url ? And where can i find it ? 

my url :
https://bonjourdrink.co/cart/add?items[][id]=8906747248967&items[][quantity]=1&items[][selling_plan]...

Thank you so much for your help!!

Best regards
Jonas