Author Topic: Child product of child product?  (Read 1004 times)

txkeyboards

  • Beginner
  • *
  • Posts: 31
  • A beginner
Child product of child product?
« on: September 13, 2019, 08:39:20 am »
I want to sell:

Shirt
> Color
   > Size

I created: Shirt, then Color as generic child, then Size as generic child under Color.

Things can be ordered just fine BUT it overrides all the value in the cart. My cart shows: Name as Medium, Color Medium and Size Medium. LOL!

Can anyone help? I tried both options disable overrides and overrides but that did not help...

Also, I use child variants for stock tracking unless I am overdoing this?...

Thank you so much!

txkeyboards

  • Beginner
  • *
  • Posts: 31
  • A beginner
Re: Child product of child product?
« Reply #1 on: September 13, 2019, 10:17:12 am »
Nevermind using multivariant solves exactly this.

For anyone who doesn't know, here is a step-by-step guide:

1/ Create a multivariant on Custom field, set Title to "Option" (or anything you want)
2/ Set "Yes" to Show Title, Published and Cart Attribute, "No" to everything up to Hidden.
3/ Type "addtocart" to Layout Position
4/ For Option box, from top to bottom is: yes, no, yes, no, no, no, no.
5/ String Customfiled is going to be a string customfield that you already created (let's say, Shirt Size) but it's not important.
6/ Now create a parent product, let's say "Shirt". In your customfield, choose "Option" (the multivariant that you created) the click Save.
7/ The first box with a list of product height, product width, etc. choose "Use customlabel", then type Color on the next box, then the next box type Black, hit enter, then type White then click Save
8/ etc.

panjarek

  • Beginner
  • *
  • Posts: 22
  • A beginner
Re: Child product of child product?
« Reply #2 on: October 20, 2020, 14:15:26 pm »
Hi,

I think I am having similar problem with variants. Were you able to create multivariant like on example below? With this configuration picking color works fine, but when I am choosing size, color is set to "choose an option". Do you have any advice? I would like to use this configuration because I can add photos only to "middle child" and sizes will inherit them.

Shirt (main parent)
  Shirt white (child of "Shirt" and parent for sizes)
    Shirt white S (last child, orderable product)
    Shirt white M (last child, orderable product)
  Shirt black (child of "Shirt" and parent for sizes)
    Shirt black S (last child, orderable product)
    Shirt black M (last child, orderable product)

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 744
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: Child product of child product?
« Reply #3 on: October 20, 2020, 15:35:28 pm »
If I need use child product with two or more params, then I use this:

https://breakdesigns.net/extensions/joomla/custom-fields-for-all
https://breakdesigns.net/extensions/joomla/stockable-custom-fields

For filtering then use this:
https://breakdesigns.net/extensions/joomla/custom-filters

Then Idea is not creating parent/child/child, but parent/child with two customfields


P.S.
Now, if I send info about 3dparty extensions, then I think a lot of another developers send you another solutions.
And that's the way it should be :)
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

panjarek

  • Beginner
  • *
  • Posts: 22
  • A beginner
Re: Child product of child product?
« Reply #4 on: October 21, 2020, 14:24:07 pm »
Thanks for suggestions, it always good to have different solutions/opinions :)

The problems is when I have parent/child with two customfields that I have to upload images to every size/color child separately. In case of parent/child/child, I just need to upload photos to color children and size children will inherit them.

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4381
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Child product of child product?
« Reply #5 on: October 21, 2020, 15:24:25 pm »
You can use variant if you want. Add the size and color in your product title
Shirt
> Color
   > Size
can be for eg:
Shirt
> Shirt red
  > Shirt red (small)
 > Shirt red (medium)
  .....
> shirt Blue
  > Shirt Blue(small)
 > Shirt Blue(medium)
  .....

In this case, you need no specific customfield and only 1 image per color
You even can add the shirt colors in the categories and use only "Shirt" as a  model(unpublished)

panjarek

  • Beginner
  • *
  • Posts: 22
  • A beginner
Re: Child product of child product?
« Reply #6 on: October 21, 2020, 16:06:40 pm »
Do you mean generic child variant right? I have tried it, it works fine, the only problem is custom label. As you wrote I have to put color and size in product title and then label is quite long. With multivarian I can display just color text (Black, White etc). Is it possible to add additional attribute to product to use is as generic child variant label?

Regarding product display in the shop, I wanted to achieve exactly what you wrote, I want to have main parent "Shirt" unpublished and display only "color" children with possibility to switch between them from product details. 

I would like to investigate the core code to check why multivariat value is not inherited properly. I think the reason is that my parents are not orderable (without variant assigned). I will try to do this in free time.

I am also thinking about buying your "Multi upload images" to speed up product creation process :)

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4381
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Child product of child product?
« Reply #7 on: October 21, 2020, 16:34:05 pm »
I am also thinking about buying your "Multi upload images" to speed up product creation process :)
If you really need to speed up shop admin tasks use my tool > Vm Be Pro