Hi all,
I'm a complete Newby and like many of yours I tried for days to find out a solution to deal with the product variants in VM2 (2.0.6 exactly). I read tons of posts/threads read people attacking Milbo who is doing a great job, in my opinion.
As you see it's my firt thread, but as I finally found a solution for my shop; I loved to give somethin back to the community.
So, what was my issue?
My shop has products with different scopes of supply (e.g. you have the basic product, a shovel (set A), another option with the shovel and a spare handle (set B)).
What I wanted was
a) a drop-down in the add-to-cart area that refreshes the price depending on the option chosen
b) as my sets have different SKUs I needed the SKU to be taken into the shopping cart (and the invoice later on), as otherwise order processing would be difficult
1) Solution A: a cart variant.
(+) easy to set up
(+) price refreshes
(-) only works with extra price for the option (so, e.g. Set B comes with an extra of +5 EUR)
(-) the only possibility to take over the SKU to the cart would be to manually type the SKU in the cart variant Field. As a result both SKUs (the SKU of the parent + the cart variant text) would show up in the cart overview (which is confusing)
2) Solution: Generic Child Variant.
First you create the child. open the "shovel" product, go to product details and create the child product. For the child product, which I named "shovel with extra handle", I put the separate SKU and the separate price (the full price, not an additional price like in the shopping cart variant).
Then you go to custom fields, create a generic child variant (published: yes, cart attribute: yes, admin only: no, list: no, hidden: no).
Go to your parent product and add the generic child variant field. Save.
Result:
(+) Options are shown in drop down
(+) page and price refreshes when different options are chosen
(+) SKU of the variant and separate price is taken to shopping cart
(-) almost perfect, however, when changing the options in the dropdown to "shovel with spare handle" it shows the product details of the child with the title "shovel with spare handle" (as the values in the drop down menu for generic child variants is the product title) which I didn't want. I wanted just "shovel", so the name of the parent to be displayed for both, child and parent.
The solution to this is basically a hack in the product details view, which displays a custom string (which will be "shovel") for all child products. I found this nice explanation how to do it (thanks mowgs!):
https://forum.virtuemart.net/index.php?topic=90833.170;wap2As said, I'm a complete beginner and I managed to do it. Fo me it does what it should, and i am SOOOO HAPPY that I finally found a solution. Maybe it helps you as well.
Best