Auto-add product to cart but have customer select variant

Auto-add product to cart but have customer select variant

SeanHebein
Excursionist
23 0 5

Hey there!

Here's my scenario, I have a sweatshirt that I want to auto-add to cart as a gift if they spend over $75 but since it is a sweatshirt I would need them to select the size. I have done something like this in the past but not with a variant selection variable. Anyone have any experience with this?

 

Thanks,

 

Sean

Reply 1 (1)

gr_trading
Shopify Partner
1828 145 191

Please refer to the below URL to get the product api usage 

 

https://shopify.dev/docs/api/ajax/reference/product

 

Get your desired product data using Ajax

 

Then you will have the list of available variant.

 

Create custom HTML block to show the variants list to user.

 

When user select the option you will have variant I'd needed to add item in cart.

 

 

Hope this will help...

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee