VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: allamistakeo19 on May 18, 2015, 21:49:38 PM

Title: Product variants with different prices but common stock?
Post by: allamistakeo19 on May 18, 2015, 21:49:38 PM
Hi,

Is it possible to have multiple variants of a product with different prices, but still a common stock?

Example: Product P exists in two variants:
but P1 and P2 are linked to the same product stock: when I order P1, it also reduces the stock of P2.

I have tried using a custom field of type "Generic child variant," but then the child gets its own stock, which is not what I want.

Thanks in advance for your suggestions.
Title: Re: Product variants with common stock?
Post by: balai on May 19, 2015, 10:01:11 AM
Why not simple custom fields?
You will have only 1 product and the user will just select a variant
Title: Re: Product variants with common stock?
Post by: allamistakeo19 on May 19, 2015, 19:51:11 PM
Quote from: balai on May 19, 2015, 10:01:11 AM
Why not simple custom fields?
You will have only 1 product and the user will just select a variant

Why not indeed, but then I need to be able to define the price of the product as a function of the value of the simple custom field. This is what I don't know how to achieve.
Title: Re: Product variants with common stock?
Post by: AH on May 19, 2015, 20:05:35 PM
Maybe this might help
https://forum.virtuemart.net/index.php?topic=127362.0 (https://forum.virtuemart.net/index.php?topic=127362.0)
Title: Re: Product variants with common stock?
Post by: allamistakeo19 on May 19, 2015, 22:50:44 PM
Quote from: Hutson on May 19, 2015, 20:05:35 PM
Maybe this might help
https://forum.virtuemart.net/index.php?topic=127362.0 (https://forum.virtuemart.net/index.php?topic=127362.0)

This definitely helps, thanks a lot for the pointer.
I've given it a try, and it seems to achieve what I need, with one exception: it apparently isn't multilingual, which unfortunately is a must in my case...
Title: Re: Product variants with different prices but common stock?
Post by: AH on May 20, 2015, 10:19:37 AM
See my post on the plugin page
Title: Re: Product variants with different prices but common stock?
Post by: allamistakeo19 on May 20, 2015, 18:13:14 PM
Quote from: Hutson on May 20, 2015, 10:19:37 AM
See my post on the plugin page

Indeed, using language overrides is the straightforward solution, even though it is not yet fully supported by the plugin. See my response to your post in the other thread for a patch to the plugin that makes it fully multilingual.