News:

Support the VirtueMart project and become a member

Main Menu

Moving from VM3 to VM4 without upgrading?

Started by ArchiB, August 22, 2022, 20:53:28 PM

Previous topic - Next topic

ArchiB

Hi all.

General question about moving from VM3 to VM4.

I am building a new J4 template on a test server and I am also building a new VM4 template on that same test server.  I do not wish to upgrade them because the templates need to change and the site need a good cleanup at the same time.  So I figured I'd build them from scratch first and the worry later. 

So my question is:
Once both templates are done... what would be the best way to migrate the information (members, products, orders, etc.) of the old J3 + VM3 to the new J4 + VM4 without upgrading the J3 + VM3.

Any insight appreciated.

Thanks




Would be going from the latest JM3 + latest VM3 to the latest JM4 + latest VM 4. 



Milbo

Do you mean this? https://extensions.virtuemart.net/back-office/import-export/virtuemart-migrator-detail

You create a second instance and then you can do the migration of the working page. So the old page is still working and you can work on the new page. The stand of the art product for migration of vm/joomla
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

dimi2013

#2
@ArchiB
Did this work for you? I'm exactly on the same boat and was wondering. On the page itself it says Joomla 3 only.

Thanks.

DayCounts

Hi,
Yes I can confirm that JMigrator works for Joomla 4 and Virtuemart 4. This is exactly why this component was developed for.
I will update the product detail page on Virtuemart.net website.

ArchiB

I did not use any extensions but did it manually.

It was fairly quick but also delicate.  It works fine if you can get around in SQL.

The path I choose was do to this:

make all thge follwoing steps on a  test server
Install a Fresh JM4 + Virtuemart
copy and backup the new DB (you might need a few tries, so I would backup after each successfull step)
upload the JM3 DB to the JM4
(so at this point I had 4 DBs - 1 x JM3 DB, 1 x JM4 DB, 1 x JM4 Copy, 1 x JM4 backup)

in choosen tables, look at the table structure differences.

copy the "data only" of some of the JM3 DB to the copy of the JM4.

One of the hurdles is the defaults arent always the same in the JM3 DB and JM 4 DB.  For example, the "locked_on" in mutiple tables has a NULL default in the JM4 but not in the JM3 but it also depending of your setup, it can be more then that.

When copying the data creates an error, I then used the JM4 DB to create information in the tables to see how it would normally write.  This creates a model.

I would use the model found in the JM4 (the previous step) to modify the information that goes into the JM4 copy.

Sometimes I would copy the JM3 VM table into the JM4 VM table with a different table prefix just to make it easier to play with.  There is one last thing you need to know if you aren't knowledgable in SQL.  Sometimes the tables won't copy because SQL detects errors  (good example of this is the 0000-00-00 00:00:00)

I get around this I used this sql cmd (xxxxx is the table prefix): This will disable temporarly strict mode.

SET SESSION sql_mode = 'NO_ENGINE_SUBSTITUTION';
UPDATE `xxxxx_virtuemart_categories` SET locked_on = null WHERE locked_on = '0000-00-00 00:00:00'


Last note... there is a probleme with VM since JM4.2  you  need to use the upcoming verison for it work plugins.  Just wanted to mention it because you might otherwise think you have done something wrong.  you can use the lastest development VM which should be release shortly as VM4.0.8

the link is here: https://dev.virtuemart.net/attachments/download/1340/com_virtuemart.4.0.7.10732_package_or_extract.zip