News:

Support the VirtueMart project and become a member

Main Menu

Child Products

Started by hugopt, December 02, 2011, 19:51:05 PM

Previous topic - Next topic

hugopt

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.

vitovito

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

p.barg

same here... Child products only appear if you do a search in the frontend, but not with their parent products

neox2007

I also could not. Does anyone have a step by step?

StevenO

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.

robbluther

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?

jaminv

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?

jaminv

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.

robbluther

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.

erik.demartiis

 >:( 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

Lars Nielsen