Author Topic: Child Products  (Read 3866 times)

hugopt

  • Beginner
  • *
  • Posts: 7
Child Products
« 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.

vitovito

  • Beginner
  • *
  • Posts: 31
Re: Child Products
« Reply #1 on: December 18, 2011, 03:39:02 am »
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

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 162
    • Barg IT
Re: Child Products
« Reply #2 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

neox2007

  • Beginner
  • *
  • Posts: 4
Re: Child Products
« Reply #3 on: December 20, 2011, 17:13:20 pm »
I also could not. Does anyone have a step by step?

StevenO

  • Beginner
  • *
  • Posts: 13
Re: Child Products
« Reply #4 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.

robbluther

  • Beginner
  • *
  • Posts: 40
    • PIC
Re: Child Products
« Reply #5 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?

jaminv

  • Beginner
  • *
  • Posts: 27
Re: Child Products
« Reply #6 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?

jaminv

  • Beginner
  • *
  • Posts: 27
Re: Child Products
« Reply #7 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.

robbluther

  • Beginner
  • *
  • Posts: 40
    • PIC
Re: Child Products
« Reply #8 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.

erik.demartiis

  • Beginner
  • *
  • Posts: 12
Re: Child Products
« Reply #9 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

Lars Nielsen

  • Beginner
  • *
  • Posts: 19
Re: Child Products
« Reply #10 on: January 18, 2012, 19:22:33 pm »
I really need this too