VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: MAD King on June 19, 2016, 15:31:05 PM

Title: Stock Control with one Main Product to Children
Post by: MAD King on June 19, 2016, 15:31:05 PM
Hello,

does anyone know if this is possible?

I have a main product, let's say an aluminum plate which I use for 5 different products.
Of these aluminum plates I have 10 in stock
What I would like to do is, to add these 10 plates to, and I do not know if this is the right term, something like a parent and assign 5 children (products) as different products to it so that all 5 children (products) show 10 plates in stock.

Now, when a customer orders one plate it should reduce the amount of plates which are in stock to 9 on all 5 children (products).

Is this possible and if so, how?

Thank you



VirtueMart 3.0.9
Joomla! 3.5.1 Stable
Title: Re: Stock Control with one Main Product to Children
Post by: Jörgen on June 20, 2016, 06:44:39 AM
If You use custom attribues to define the variants it will work as you want. The custom attributes don´t use Children and use the same stock. Define the attributes as cart item and look at the demo page for more examples.

regards

Jörgen @ Kreativ Fotografi
Title: Re: Stock Control with one Main Product to Children
Post by: MAD King on June 20, 2016, 18:41:03 PM
Thank you Jörgen.

So, all products have to be parents? But how do I assign the attributes to each of them? It was clear with VM 1x, but with 3 it is a little bit more complicated.
Title: Re: Stock Control with one Main Product to Children
Post by: Jörgen on June 20, 2016, 20:35:25 PM
It is fairly simple, start here:
https://docs.virtuemart.net/manual/products-menu.html (https://docs.virtuemart.net/manual/products-menu.html)

regards

Jörgen @ Kreativ Fotografi
Title: Re: Stock Control with one Main Product to Children
Post by: MAD King on June 20, 2016, 21:09:48 PM
Thank you, but I saw that already and there is nothing on it, except

A handy list of all product with inventory levels shown. Sort by clicking any of the headers. Unpublish so customers cannot see this item by clicking the green checkmark in the PUBLISHED Column.


https://docs.virtuemart.net/manual/products-menu/inventory.html
Title: Re: Stock Control with one Main Product to Children
Post by: jenkinhill on June 20, 2016, 22:01:40 PM
Quote from: MAD King on June 20, 2016, 18:41:03 PM
But how do I assign the attributes to each of them?

You can assign custom fields to a group and assign the group to each product.

Also http://docs.virtuemart.net/manual/general-concepts/212-customfields.html
Title: Re: Stock Control with one Main Product to Children
Post by: Jörgen on June 21, 2016, 07:04:13 AM
The documentation is there, You just have to look around. I showed You the book, but You have to read it Yourself :)

As Jenkins sais grouping can be a good idea. But grouping customfields into groups has it's diasadvantages. Any custom field name for example "diameter" can only be in one group at a time. If You create customfield groups think hard first.

You can also make unpublished products that You can use as templates with the custom fields You need.

regards

Jörgen @ Kreativ Fotografi
Title: Re: Stock Control with one Main Product to Children
Post by: MAD King on June 21, 2016, 14:15:18 PM
Thank you. I hope I will figure it out, somehow.