VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: hugopt on December 02, 2011, 19:51:05 PM

Title: Child Products
Post by: hugopt on December 02, 2011, 19:51:05 PM
Hello.

I'm using virtuemart2.0.0_RC3_Pre_c.
I'm trying to create a product with childs but they don't show in product page.
Even with the example data base, the product  "Circular Saw" have 4 child with different price but I can't see it.

I would like to create dress products and each child have different stocks, for example:
Jeans XS - 2
Jeans S   - 1
Jeans XL - 4
It's necessary any special configuration for create child products and display it?

Thank you.
Title: Re: Child Products
Post by: vitovito on December 18, 2011, 03:39:02 AM
Quote from: hugopt on December 02, 2011, 19:51:05 PM
Hello.

I'm using virtuemart2.0.0_RC3_Pre_c.
I'm trying to create a product with childs but they don't show in product page.
Even with the example data base, the product  "Circular Saw" have 4 child with different price but I can't see it.

I would like to create dress products and each child have different stocks, for example:
Jeans XS - 2
Jeans S   - 1
Jeans XL - 4
It's necessary any special configuration for create child products and display it?

Thank you.

I wish to understand too
Title: Re: Child Products
Post by: p.barg on December 20, 2011, 14:35:44 PM
same here... Child products only appear if you do a search in the frontend, but not with their parent products
Title: Re: Child Products
Post by: neox2007 on December 20, 2011, 17:13:20 PM
I also could not. Does anyone have a step by step?
Title: Re: Child Products
Post by: StevenO on December 20, 2011, 17:16:59 PM
For me it doesn't work with te final version aswell. I install sample data, it doesn't display the child product on the good way. I hope anyone can help.
Title: Re: Child Products
Post by: robbluther on December 22, 2011, 17:00:47 PM
I have just started working on this myself.  Anyone learn anything about relating child products to the parent?  In a dropdown or even radio option?
Title: Re: Child Products
Post by: jaminv on December 27, 2011, 20:52:43 PM
It can be done (to some degree) with templating.

You can copy /components/com_virtuemart/views/category/tmpl/default.php  and/or  /components/com_virtuemart/views/productdetails/tmpl/default.php over to /templates/<your template>/html/com_virtuemart/category/default.php  and/or  /templates/<your template>/html/com_virtuemart/productdetails/default.php (respectively).  You can then edit the heck out of these files to make the views look however you want.

It will require some PHP knowledge, and quite a bit of editing, but you can get some nice parent/child views.  I've gotten pretty far with this.

Where I've hit a wall, however, is getting the raw data I need to list details about child products.  The variables provided don't give a lot of details about the child products, and going back to the databases via direct query seems "hacky".  I'm sure there's a way, I just haven't figured it out yet.  Perhaps someone could enlighten me?
Title: Re: Child Products
Post by: jaminv on December 27, 2011, 23:04:00 PM
Looking around, I don't see any way to get the data I need about child products without querying the database directly.   It really doesn't seem like a view/template should be doing this.

So it appears that the options are:  create a hack template, modify stockable.php so that it actually works properly, create a new plugin based on stockable.php, or wait for the next release when the bugs will presumably be fixed.

Still, it seems like the plugin displays data one way and only one way.  So if you want radio buttons or a table instead of a drop-down list (I want a table, complete with add-to-cart buttons for each element), you're still going to have to do a decent amount of customization.  That is, unless stockable.php suddenly became a lot more user friendly and offered a lot more options...

Not holding my breath.  I guess I'll start coding.
Title: Re: Child Products
Post by: robbluther on December 28, 2011, 13:46:18 PM
Yeah, it seems like at this point, the child product feature is worthless.  In my case, I have a lot of products and the SKU changes based on options.  So, a different finish will change the SKU...  that is not currently possible in VM2 and I know there must be a lot more people out there that need this feature.
Title: Re: Child Products
Post by: erik.demartiis on January 18, 2012, 11:31:00 AM
 >:( Child product not inherit Category and Manufacturer and price and a lot of things!
Inherit image and short/long description but is not enough.
Please resolve this issue. Is very important.
I''ve found a lot of bug in VM2, and I'm a little worried about opening the store to the users.

Regards.
Erik
Title: Re: Child Products
Post by: Lars Nielsen on January 18, 2012, 19:22:33 PM
I really need this too