Product Customization Add On / Variants and Inventory

Shopify Partner
19 0 3

Say I'm selling a T shirt for $20 in three variants - small, medium and large.  

From what I gather from this tutorial, if I wanted to add the ability add customization, at say an extra $10, I would have to add three additional variants.  So, 

$20 - small, medium, large

$30 - small + customization, medium + customization, large + customization.

The problem (aside from seeming overly complicated) is that this method creates two different SKUs for what is essentially one product, making tracking inventory difficult/impossible - small (without customization) and small plus customization is the same product as far as inventory is concerned.

Is there not a way to add a 'global' add on - an extra $10 to any product to add customization?

 

 

 

0 Likes
Shopify Expert
3933 15 324

Yes. Just add the customization to the cart as a $10 item. So your $20 t-shirt is in the cart, plus the $10 customization product. Capture the customization data with line item properties.

 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes
Shopify Partner
19 0 3

And that  $10 item can be visible on the individual product page?

0 Likes
Shopify Expert
3933 15 324

Yes.. you can easily display 2 products on one page, and put both into the cart with one add to cart click using the javascript API. Capture the optimization in line item properties and you're gold. On the cart, display both together, and if the customer removes the product, remove the $10 option too. 

All in a days work. 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes
Shopify Expert
9765 86 1517

An example of what HunkyBill is talking about - price aren't the same but you'll get the idea. Here's the ajax api reference -- should be required reading once you get into product customisation pages.

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes
Shopify Partner
19 0 3

Thanks guys.

If I understand correctly - create hidden product (the 'customization' product), then use ajax to add its variant id when customer hits add to cart on any product (IF a checkbox or whatever is selected).

My problem is that, even after looking over the ajax api, I'm in over my head with ajax (Separately, I was able to set up a mini-cart by sort of copying someone else's code).

Jason, I assume what I should be looking at is your addToCart function?  

 

 

 

 

0 Likes
Highlighted
Shopify Expert
3933 15 324

There is no need to hide the customization product. It is like any other product in your shop. It exists. You cannot checkout hidden products so you want to set it up as you would any other product. 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes
Shopify Partner
19 0 3

Got it, but my much bigger problem is the ajax part.  Any in-depth ajax tutorials out there that can help me with this particular functionality?  Or more direction with how Jason implemented it?  I can follow all the code relating to only adding product if custom option exists (via checkbox, character length, etc).

0 Likes
Shopify Expert
9765 86 1517

The ajax-api is easy to use (if I can do it...) and there is plenty of examples on the net and in these forums that you could reference. Time to grab a vodka and do some reading. Tetchi has some good blog posts (including this one) on his site.

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes