Author Topic: Product variants with different prices but common stock?  (Read 2075 times)

allamistakeo19

  • Beginner
  • *
  • Posts: 24
Product variants with different prices but common stock?
« 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:
  • Variant P1 costs 10
  • Variant P2 costs 15
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.

balai

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1384
Re: Product variants with common stock?
« Reply #1 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

allamistakeo19

  • Beginner
  • *
  • Posts: 24
Re: Product variants with common stock?
« Reply #2 on: May 19, 2015, 19:51:11 pm »
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.

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3013
  • VirtueMart Version: 3.6.3
Re: Product variants with common stock?
« Reply #3 on: May 19, 2015, 20:05:35 pm »
regards
A

Joomla 3.9.12
php 7.2

allamistakeo19

  • Beginner
  • *
  • Posts: 24
Re: Product variants with common stock?
« Reply #4 on: May 19, 2015, 22:50:44 pm »
Maybe this might help
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...

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3013
  • VirtueMart Version: 3.6.3
Re: Product variants with different prices but common stock?
« Reply #5 on: May 20, 2015, 10:19:37 am »
See my post on the plugin page
regards
A

Joomla 3.9.12
php 7.2

allamistakeo19

  • Beginner
  • *
  • Posts: 24
Re: Product variants with different prices but common stock?
« Reply #6 on: May 20, 2015, 18:13:14 pm »
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.