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?
All in a days work.
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?
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).
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.