News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Child products not inheriting from parents?

Started by rand486, November 27, 2012, 22:24:19 PM

Previous topic - Next topic

rand486

I found this FAQ about child products: http://forum.virtuemart.net/index.php?topic=98648.0

However, after creating child products and categorizing them, I found few of the fields actually inherited.  Tax rates, descriptions (in two languages), images... none of them inherited.

Is this not yet finished?  The FAQ says very clearly that these fields should be picked up.

I really don't want to go through all the products and manually implement these details, or figure out the database relationships well enough to do it via mySQL, when these behaviours are supposed to work in the first place.

I'm running Joomla 1.5.26 and VM 2.0.14

templeton

I have the same issue.  Specifically, images are not being inherited.

Carlos

templeton

I just want to clarify that I am running Joomla 2.5.6 and VM 2.0.14.

I was on VM 2.0.10 and there wasn't an issue.  Only since upgrading has this happened.  Products that do not have any children display without issue (b/c they have images).  As far as I can tell the function "displayMediaThumb" returns no a blank string.  I'm a critical point here.  Can one of the developers lend a hand here?

Thanks.

rand486

Yes, I rarely get responses to my questions here.  Fortunately, I'm adept with PHP and MySQL, so I often trace my own problems in the long run.

I ended up copying all the info from the parent to the child, using an UPDATE statement and an inner join.  If you know MySQL, you can easily modify this to copy whatever fields you need to copy over:

UPDATE `jos_virtuemart_products_fr_fr`
INNER
  JOIN (
       SELECT jos_virtuemart_products.virtuemart_product_id, product_parent_id, product_s_desc, product_desc
       FROM `jos_virtuemart_products`, `jos_virtuemart_products_fr_fr`
       WHERE product_parent_id=jos_virtuemart_products_fr_fr.virtuemart_product_id
       ) as my_current_select
   SET jos_virtuemart_products_fr_fr.product_s_desc = my_current_select.product_s_desc,
          jos_virtuemart_products_fr_fr.product_desc = my_current_select.product_desc
WHERE jos_virtuemart_products_fr_fr.virtuemart_product_id = my_current_select.virtuemart_product_id


Best of luck.  It's not ideal, as the inheritance of the fields should be passive, but here's hoping they fix that in coming updates.  So far, the updates to VM 2 have broken as much on my eStore as they've fixed.

templeton


Thank you for the info.  I will keep this in my back pocket.  I know PHP too and took a quick look at the displayMediaThumb function for any obvious issues but nothing was jumping out at me.  I'm going to take another stab at it and see if I can't track it down.  If I figure it out I will post my solution.  I hear you on response time.