Author Topic: Make childs of a parent be in quantity multiples and subtract from one inventory  (Read 576 times)


  • Beginner
  • *
  • Posts: 10
Hello, first off, I want to thank the people who make and support this product.

This is the scenario. I have 50,000 marbles that are black i want to sell. Based on customer preference, they chose how many packs of multiples they want.  They can order 3 marble bags, 5 marble bags and 10 marble bags. So I was hoping there was some way I could do variants where the customer chooses x4 3 marble bags, x7 5 marble bags, and x3 10 marble bags from one product. This way it subtracts from inventory (4x3)+(7x5)+(3x10) for a total of 77 marbles from inventory and the new inventory is 40,923.

I would also like to add variant +$2 for polished and non polished to each of the bag options.

I have been stuck on this and can't quite figure it out. Anyone excited about the challenge?  Thank you for listening.

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4386
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
The stock is by product and not variant.
If you need to manage your way the stock, this can perhaps work with a custom field plugin, but not with a shop setting.
For your option "polished", this can use standard custom field with the "list" option when you set it.