Author Topic: Reuse Child Products  (Read 462 times)

irsinternet

  • Beginner
  • *
  • Posts: 25
  • A beginner
Reuse Child Products
« on: July 24, 2018, 02:34:17 am »
Is there a way to reuse child products (multi variants) across multiple parent products?
For instance, shirts and shorts come in blue, red, and green denim. Can I create 1 "green" child product across all my products?

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2285
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Reuse Child Products
« Reply #1 on: July 24, 2018, 07:48:43 am »
This depends on what You are doing. The child Green can only have one SKU and one parent. If You need stock handling I do not see how this would work. Using customfields is very lightly a possible solution, You can have a hidden parent with green customfield that is inherited to all Your products that You assign as children for this master product.

There is also Custom fields for all plugin that maybe could cover your needs.

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3955
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Reuse Child Products
« Reply #2 on: July 24, 2018, 13:10:13 pm »
This is not really possible, because the child inherits everything from the parent, so you should find a way to dynamically change the parent and the parent should know that he is a child.
Can be with an additional plugin to change the parent on loading, but it should be tested and certainly not work for complex case.
Another solution is perhaps something as my extra product plugin, but in this case multivariant need to be complety reimplemented and is more limited.