News:

Support the VirtueMart project and become a member

Main Menu

Is there a way to migrate custom fields to new format?

Started by bunglehaze, December 02, 2014, 12:20:14 PM

Previous topic - Next topic

bunglehaze

Hi chaps, I have put my site on a subdirectory, copied it all over and upgraded to VM3 with only a little bit of trouble (mainly having to extract the gzip file and recompress as zip to bypass unable to write error)

Having done that I have enabled database tools, removed old inherited customfields using the button and also Update vm2 order format of customfields to vm3 format (though i have this option twice and the first button does nothing)

I get no output from either of those functions though, just a page reload.

In any case I have gone into my custom fields and setup a generic cart variant and tested that the dropdown works when manually applied to my parent but with around 1000 child varaint options this would be impossibly time consuming to do manually - I am hoping there is a more efficient method to do this.

GJC Web Design

Just to confirm please....

So in your test migration in 2.5 parent/child were stockable  plugin variants?
You migrated and all parent/child relationships OK?
Removed old custom fields and all that is needed to recreate the old stk. vars is to attach the generic child variant to the parent?

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

bunglehaze

#2
Quote from: GJC Web Design on December 03, 2014, 00:33:55 AM
Just to confirm please....

QuoteSo in your test migration in 2.5 parent/child were stockable  plugin variants?
You migrated and all parent/child relationships OK?

It all seems to be OK on first inspection

QuoteRemoved old custom fields and all that is needed to recreate the old stk. vars is to attach the generic child variant to the parent?

All the old custom fields are still in place despite using the remove custom fields tool and this has not been replaced by the VM3 version which I guess is generic child variant. However when I have manually added the generic child variant to a product it is doing a page load when each product is selected on the frontend dropdown and I saw a post by Milbo before it was launched to say it should be handled by ajax like the old stockable plugin (which is why many of us used that over generic child variant in vm2 anyway).

So yes, the main issue I am having is that the old stockable plugin isnt being removed and replaced by the current alternative and it realistically needs to be ajax loaded to cut down on page loads.

To add to this also.

I have two plugins in custom fields, one child variant, one generic child variant. The child variant one does indeed work without a page reload (just not on the template I am using which is supposed to work with VM3) so I guess the need is just there to have in the tools and migration function a way to migrate stockable plugins to use child variant instead.

Having looked through most of the plugins such as the related categories/products and generic child variant I am getting errors that may be worth noting:

Warning: SimpleXMLElement::xpath(): Unfinished literal in /home/xxxxx/public_html/vm3up/libraries/joomla/form/form.php on line 1545

Warning: SimpleXMLElement::xpath(): xmlXPathEval: evaluation failed in /home/xxxxx/public_html/vm3up/libraries/joomla/form/form.php on line 1545

Warning: SimpleXMLElement::xpath(): Unfinished literal in /home/xxxxx/public_html/vm3up/libraries/joomla/form/form.php on line 1545


bunglehaze

Is there a way to automate this process? Any shop with more than a handful of stockable enabled variants will find manual editing each product really annoying.

Milbo

The message is harmless and is fixed.

The ajax works for any product reload if you are already in the productdetails view. Just as simulation, remove the stockable customfield and replace it agains the "child variant", not the generic one! Then store that.

Then you will see the system is almost the same, the problem is to port the config information from one to the other. It is a tough day. It sounds like an hour, yes. But the problem starts in detail.

Do I have your skype? If there is a tester and all that, it could help a lot. Of course we have testers, but not anyone is interested in this specific task.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

bunglehaze

I manually changed a few of my products on the last test I did over the weekend and can see the custom fields now working - though I do have to say the ajax reload time on my site using beez5 takes longer to update the prices than a proper page load for each item which negates the ajax function a little. As an example, on my VM2 site the stockable plugin updates prices in a little over a second, the VM3 child variant prices can take 3-4 seconds to change (on J2.5 currently too in order to keep it simple)

I am testing every day and still struggling to find a way to easily and safely migrate from VM2 to VM3 for my site which just will not work correctly regardless of templates used. The custom fields needing to be manually changed for each option is a real ballbreaker as I am wiping my install every day and making a fresh copy which is far more work than just installing another ecommerce platform and clicking migrate from VM2 which is something many people will do if making an upgrade from VM2 to VM3 is problematic.

I spoke to another developer last week who advised me to use another platform to Virtuemart,  this is not something I want to do or am interested in, I have used VM now for many, many years and have held back my upgrade to J!3x specifically until VM3 was ready so I could continue with it but working 12 hour days in my shop means I don't have another 12 hours to sit and try and workaround a fundamentally important part of an ecommerce shop.

As it is, I have a site to migrate, a template I quite like that is supposed to work with VM3 but doesn't work as expected and all I can see is a long road to migrate rather than a few clicks which leaves me a working site in which to customise and test the template.I think you did have my Skype a while back but unfortunately with work being so busy at the moment I struggle to see my kids which means the free time I would have had to test this with you isn't really a possibility right now.

bunglehaze

#6
Right then an update...

I have gone in and done another migration, one that I am happy with and almost happy enough to put live but for one problem. I have manually deleted the stockable links and then added in the child variant and none of my product details or prices are changing on the FE, that is regardless of which template I select too.

Coupled with this I have found the annoying issue I reported in VM2 regarding parent items being zero stock and not being able to order child products still persists too. In the case of VM2 I had to comment out a chunk of code which allowed child products to be ordered or I have to out parent items with at least 1 item in stock and that created a bit of a problem when I use modules set to display in stock items - they displayed all the parents despite the children being out of stock.

The most important issue for me is obviously getting the child variants plugin to work correctly as it clearly is not doing at the moment.

***

A further update. I have a working shop for the time being using the generic child variant but this is hellishly slow loading each product child variant. There are a few other issues that seem to be as a result of using the generic child variant such as one with the product rating, this shows up the rating on the parent but when any of the child products are selected the rating vanishes which makes it look like the product hasn't had any reviews.

I will try removing the child variant again and reinstalling it and configuring it to see if that solves the loading issue


bunglehaze

Milbo, I just checked again with the Child Variants field and noticed that the script itself doesn't seem to be working on the backend. Adding a new variant for instance does not go anywhere or enter details.

What scripts or functions are likely to cause this in the backend and would this issue also affect the frontend operation too?

One other thing I have a question about with this is when I save a child variant custom field I get the parameters options at the bottom of the page with language missing, is this likely to just be missing text in the language files or another potential problem with the plugin or function on my install?

bunglehaze

Just another extension on the previous posts really.

I have added back in the custom field using child variant and have found a very strange behaviour:

When I select my product "strawberry jam" I am taken to the product detail page - all good.
In the dropdown there are two options - 100ml and 200ml let's say - 300ml is out of stock and is not showing up - again all good
Selecting the dropdown options, 100ml or 200ml work as expected - the AJAX loads the correct details and I can add to cart.

Now going to another product with more options available "rhubarb jam" - product page loads fine
In the dropdown there are ALL the sizing options available to me but compared to the Strawberry Jam product it is also displaying all of the out of stock items too so they appear to be available
Selecting the relevant variant from the dropdown in this case on any of the products I know to be in stock and nothing happens at all, the AJAX does not load the details or change pricing.

I cannot figure this out at all, there is no difference between "strawberry jam" product and "rhubarb jam" and yet the child variant field seems to react totally differently. It seems to work fine with one product and not at all on another related product and all using the same templates, scripts etc.