VirtueMart Forum

VirtueMart 2 + 3 + 4 => Installation, Migration & Upgrade => Topic started by: rosen4o on October 11, 2016, 11:57:54 AM

Title: Migration to VM 3 and automatic child variant
Post by: rosen4o on October 11, 2016, 11:57:54 AM
Hello All,

I have migrated VM2 to VM3 which has a lots of products with Automatic child variants
Child and variants are migrated but when I open product from frontend no options are show for selection at Automatic child variant dropdown
If I just open the product and save it then all variants are shown

Is there any way to fix the issue without the need to open and presave all products?
Title: Re: Migration to VM 3 and automatic child variant
Post by: rosen4o on October 12, 2016, 14:07:17 PM
Maybe I have the problem
In table #__virtuemart_product_customfields there are many records with value stockable and the new format is with product_name and different params
I will try to rewrite the records and see what will happen
Title: Re: Migration to VM 3 and automatic child variant
Post by: GJC Web Design on October 12, 2016, 15:18:53 PM
were you using the old VM2 stockable customs?

Sadly I know of no migration to VM3 style stockable children

What I have been doing with migrations so far is open each parent ->customfields and attach the Multivariant custom plugin to it..
The children are immediately mapped and it takes a couple of clicks to get it all correct

Title: Re: Migration to VM 3 and automatic child variant
Post by: rosen4o on October 14, 2016, 09:40:15 AM
Presave is solution if you have not so many products
Otherwise it's not option

I have found that I need to change cutomfields params and values like this
QuoteUPDATE `j25_virtuemart_product_customfields` SET customfield_value='product_name', customfield_params='withParent="0"|parentOrderable="0"|wPrice=0|', published='0' WHERE customfield_value='stockable'

And then remove all NULL prices like this
QuoteDELETE FROM `j25_virtuemart_product_prices` WHERE `product_price` is NULL

Then selections are shown  and add to cart buttons are shown too
Title: Re: Migration to VM 3 and automatic child variant
Post by: GJC Web Design on October 14, 2016, 10:38:36 AM
what exactly were your VM2 customs for others enlightenment?