Virtuemart import table prefix - feature request

  • Posts: 250
  • Thank you received: 7
10 years 10 months ago #138840

When importing from Virtuemart it would be really useful if it were possible to specify the table prefix of the Virtuemart tables, at the moment the importer requires the old and new database tables to have the same name prefix which isn't always going to be the case.

Many thanks,

Ian

Please Log in or Create an account to join the conversation.

  • Posts: 82908
  • Thank you received: 13379
  • MODERATOR
10 years 10 months ago #138861

Thank you for your feedback.

The import system has to be able to link the users in VirtueMart to the users in HikaShop via the user table of Joomla. If the users in Joomla/HikaShop are not synchronized with the users in VirtueMart or that the users in VirtuMart/Joomla are not synchronized with HikaShop, the import won't work properly.
Such synchronization usually implies that HikaShop is installed on a website where VirtueMart is already present, or that a migration from an old website with VM has been done to port the users to the new website.

In order for the import system to be able to function properly, the VM tables, Joomla tables and HikaShop tables should have the same prefix as they should actually be on the same website. If that's not the case, it would require for HikaShop to handle the import and synchronization of the joomla users too, like we did with the import of OpenCart, as if both the old and the new websites where on the same database. That would require to have not only the VirtueMart tables but also the joomla tables of the old website in the database.

In short, such possibility would require a lot of work to be done properly and not necessarily easier for the user.

Please Log in or Create an account to join the conversation.

  • Posts: 250
  • Thank you received: 7
10 years 10 months ago #138887

Thank you for the reply Nicolas.

The scenario you describe is actually probably not very likely as I suspect most users will be like me, trying to upgrade an old Joomla 1.5 site to Joomla 2.5 or 3 so the old and new sites are not likely to be on the same database or even server.

To give you some insight to my problem, I did a migration from an existing Joomla 1.5 VM 1 site to Hikashop some months ago. I used jUpgrade to migrate users and contents from the old site and jUpgrade requires the old and new tables to have different prefixes. I then proceeded to import the Virtuemart data into Hikashop but to do that I had to rename the old Virtuemart tables to have the same prefix as the new site. I could only do this by doing an SQL dump, search and replace on the resultant text file and then re-import the renamed tables. That all worked fine and I have proceeded with development, but while I have been working on the new site there have been changes on the existing site (new customers and orders and some new products). I now have the problem of synchronising those changes back into the new site, as you can imagine this process has become quite complex and I am having to use a fresh install of Joomla 3.2 as a staging server and copy updated tables across, renaming the vm tables along the way. I have yet to find out how successful that will be.

It would have made my task easier at one point if the Virtuemart import in Hikashop had a text field which allowed me to set the table prefix (it could default to the existing prefix) and I was going to go even further by saying can we have the facility to set the ip address, database name and login credentials as well so that data can be pulled from a remote server. Particularly useful as your import routine knows what it's already imported and just adds new data.

I take your point about Joomla users having to be synchronised as well. I am already using different tool to do that so I wouldn't worry about getting Hikashop to do it (although it would be great if it did!). All it would require would be a warning notice that Joomla users need to be synchronised first.

As I say, that's my view from a real world case, I hear your argument but I know the feature would have sped the process of getting my Hikashop live and made my life a lot easier!

Many thanks,

Ian

Please Log in or Create an account to join the conversation.

  • Posts: 82908
  • Thank you received: 13379
  • MODERATOR
10 years 10 months ago #138894

Thanks for your input.
The possible to connect to a remote server is just not feasible as the improt has to do left joins between hikashop and virtuemart tables and that is only possible if the tables are on the same database.

Please Log in or Create an account to join the conversation.

  • Posts: 250
  • Thank you received: 7
10 years 10 months ago #138913

Ah yes, I can see the problem with remote database, but configurable table prefix might be possible?

Thanks,

Ian

Please Log in or Create an account to join the conversation.

  • Posts: 82908
  • Thank you received: 13379
  • MODERATOR
10 years 10 months ago #138917

It is, but as I said, if the user ids in the VM tables don't match the user ids in the joomla user table, some of the import process won't work properly.

Please Log in or Create an account to join the conversation.

  • Posts: 250
  • Thank you received: 7
10 years 10 months ago #138923

That's understood, and is an issue I'm having to deal with anyway as I have to migrate joomla users and then virtuemart in separate stages, but the feature would save me the tedious step of having to export tables as text, replace prefix and then re-import.

Thanks,

Ian

Please Log in or Create an account to join the conversation.

Time to create page: 0.064 seconds
Powered by Kunena Forum