VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: JaumeQuerS on March 16, 2012, 13:44:22 PM

Title: Insert DB rows to (almost SQL/CSV ) get PRODUCT CHILDS working (2.5+2.0.2)
Post by: JaumeQuerS on March 16, 2012, 13:44:22 PM
I know that there are other posts related with that issue. But I think we should sepparate discussions, working threads, solutions, etc... If someone consider this should goes into another thread, could delete it or move it.

After many battles (obviously our fault) we found the way (step by step) to get Stockable Products to work. Sometimes didn't worked as we expect and sometimes directly doesn't work. Next question (step) was the need to understant how this is stored to get complete knowlegde and control of that. The last stage (well... never is the last) has been "how can we inject rows into DB to link Bussiness's ERP with VM2.0.2".

BEWARE: if you're not Accostumed to SQL sentences/CSV imports to MySQL maybe this article is not for you.

So we get a list of "things" you'll have to attend to import products with CHILDS":

I recommend this first steps to be done through administrator (not DB), it's easiest:

(from virtuemart_customs table, write down the id's assigned for the both custom fields. You'll needed in *NOW*... for example 8 and 6)

NOW Refering to PRODUCT'S table (DB!!):

For example, if you have inserted product LADDER which has product_id 10 his childs : WOOD LADDER, METAL LADDER, etc... must have product_parent_id = 10

For each PARENT's product_id of a product of virtuemart_products:

For example, if you have inserted product LADDER which has product_id 10, so you'll have to insert a row with 10 and 6 and another row with 10 and 8.

IMPORTANT: Things that made that all things will not work

Even if you follow this confusing guide and in administrator perfectly see all the childs and parents linked ... perhaps in frontend you can't see the INPUT SELECT to choose a Child. This could happen because:


Our objectives are accomplished so we can't investigate more on this procedure (or in other similars)... I'm sorry we can't help anymore on that at the moment.

Thanks to my colleague David Luna who has made almost all the job

[attachment cleanup by admin]
Title: Re: Insert DB rows to (almost SQL/CSV ) get PRODUCT CHILDS working (2.5+2.0.2)
Post by: chiappa on March 16, 2012, 18:28:52 PM
Thank you for the post! I have yet to find another solution for getting Stockable Products to work and these instructions seem too difficult for my understanding. Step by step instructions would be greatly appreciated!