Jump to content

Whmcs Migrator (Beta) - Updated 2013-11-12


Cody

Recommended Posts

Why can't I just connect to http://localhost/blesta ???

I'm trying to start a new trial to just do the import with my core i7 and SSD drive so I have no performance related issues.

 

http://www.blesta.com/forums/index.php?/topic/804-trying-to-install-free-trial-says-the-license-key-is-invalid/

 

Have a look at that thread please mate.

Link to comment
Share on other sites

Damn, still took forever. 

importStaff
-----------------
importStaff took: 0.253 seconds
-----------------

importClients
-----------------
importClients took: 934.4394 seconds
-----------------

importContacts
-----------------
importContacts took: 2.1911 seconds
-----------------

importTaxes
-----------------
importTaxes took: 0.005 seconds
-----------------

importCurrencies
-----------------
importCurrencies took: 0.024 seconds
-----------------

importInvoices
-----------------
importInvoices took: 328.3218 seconds
-----------------

importTransactions
-----------------
importTransactions took: 31530.5644 seconds
-----------------

importPackages
-----------------
importPackages took: 7.1774 seconds
-----------------

importServices
-----------------
importServices took: 244.932 seconds
-----------------

importSupportDepartments
-----------------
importSupportDepartments took: 0.07 seconds
-----------------

importSupportTickets
-----------------
importSupportTickets took: 51.706 seconds
-----------------

importMisc
-----------------
mail log took: 3061.2902 seconds
settings took: 0.659 seconds
calendar events took: 0.001 seconds
importMisc took: 3061.9542 seconds
-----------------

decrypted 10522 values using WHMCS' custom algorithm
decrypt took: 1.3451 seconds
total time took: 36161.6394 seconds
Array
(
    [last_name] => Array
        (
            [empty] => Please enter a last name.
        )

)

 
Link to comment
Share on other sites

Here is my example of the pricing issues...  There are several plans where Blesta has multiple prices for the one term even though only one is truly valid.

 

Blesta:

lhL25zg7y1.png

 

WHMCS:

lh9IuPOk46.png

 

Where did 230.10 come from? Check your tblpricing table. That might shed some light on the 0.00 price as well.

 

Do you have the gmp extension enabled on your machine? Just curious since importing clients took 3 times as long as importing invoices, and I'd expect you'd have more invoices than clients.

 

FYI, I've got a theory on improving performance of the importer that I'm going to put to the test today. We'll see how it goes.

Link to comment
Share on other sites

Where did 230.10 come from? Check your tblpricing table. That might shed some light on the 0.00 price as well.

 

Do you have the gmp extension enabled on your machine? Just curious since importing clients took 3 times as long as importing invoices, and I'd expect you'd have more invoices than clients.

 

FYI, I've got a theory on improving performance of the importer that I'm going to put to the test today. We'll see how it goes.

 

Dude, I have no idea...  gmp should be enabled, yes.  It's in the php.ini.

As for the pricing, I'll check the table, not sure what I'm looking for.

 

As for your theory, want me to try it and tell you how it goes before you release a new importer?  I may have the largest database of anyone here...

Link to comment
Share on other sites

Dude, I have no idea...  gmp should be enabled, yes.  It's in the php.ini.

As for the pricing, I'll check the table, not sure what I'm looking for.

 

 

SELECT * FROM `tblpricing` LEFT JOIN `tblhosting` ON `tblhosting`.`id`=`tblpricing`.`relid` WHERE `monthly`='230.10'

 

That should give you some info on where it's coming from.

 

 

As for your theory, want me to try it and tell you how it goes before you release a new importer?  I may have the largest database of anyone here...

 

Absolutely, though I'll probably have you test on just clients to get a benchmark.

Link to comment
Share on other sites

Ok, checked the tblpricing

 

SELECT * FROM `tblpricing` LEFT JOIN `tblhosting` ON `tblhosting`.`id`=`tblpricing`.`relid` WHERE `monthly`='230.10'

 

That should give you some info on where it's coming from.

 

 

 

Absolutely, though I'll probably have you test on just clients to get a benchmark.

 

No results found.

 

The WHMCS productid is 160 so I looked for that and got these results:

SELECT * FROM `tblpricing` WHERE `type` = 'product' AND `relid` = '160'

lhlQVGwvHj.png

Link to comment
Share on other sites

Try the attached whmcs_migrator.php file. Place it in /plugins/import_manager/components/migrators/whmcs/.

 

This will only run importStaff, importClients, importContacts, importTaxes, importCurrencies, and importInvoices.

 

You should see speed improvements on importClients and importInvoices. I'm curious how they compare to your last run.

whmcs_migrator.php

Link to comment
Share on other sites

Try the attached whmcs_migrator.php file. Place it in /plugins/import_manager/components/migrators/whmcs/.

 

This will only run importStaff, importClients, importContacts, importTaxes, importCurrencies, and importInvoices.

 

You should see speed improvements on importClients and importInvoices. I'm curious how they compare to your last run.

 

running now...

Link to comment
Share on other sites

Results from latest import:


importStaff
-----------------
importStaff took: 0.8861 seconds
-----------------

importClients
-----------------
importClients took: 703.2672 seconds
-----------------

importContacts
-----------------
importContacts took: 5.5433 seconds
-----------------

importTaxes
-----------------
importTaxes took: 0.009 seconds
-----------------

importCurrencies
-----------------
importCurrencies took: 0.089 seconds
-----------------

importInvoices
-----------------
importInvoices took: 318.2752 seconds
-----------------

decrypted 0 values using WHMCS' custom algorithm
decrypt took: 0 seconds
total time took: 1028.0708 seconds
Array
(
    [last_name] => Array
        (
            [empty] => Please enter a last name.
        )

)

 
Link to comment
Share on other sites

Looks like a 20% improvement, which is significant. Looks like performance has an incredible amount to do with what's going on with the box since import contacts went from 2.19 seconds to 5.54 seconds even though nothing changed with respect to that routine.

Link to comment
Share on other sites

I think we can make the importTransactions routine comparable to importInvoices if we allow whatever WHMCS says is applied to an invoice to be applied. That is, bypass Blesta's apply transaction routine which does all of the necessary checks. Obviously this may cause some issues if your WHMCS data is not properly accounted for.

Link to comment
Share on other sites

I think we can make the importTransactions routine comparable to importInvoices if we allow whatever WHMCS says is applied to an invoice to be applied. That is, bypass Blesta's apply transaction routine which does all of the necessary checks. Obviously this may cause some issues if your WHMCS data is not properly accounted for.

 

I think if we do that it should be an option, and not the default option.

Link to comment
Share on other sites

I think if we do that it should be an option, and not the default option.

 

I agree, an option would be great.  It would also be nice to support running the importer to import staff and clients, then run it later to import packages / products / services.  Then run it again and just import misc, or support tickets or whatever.

 

Obviously some items require others to exist, you can't import invoices without clients and so on.  I'd also like an option to not import clients that don't have active services or domains.  Since you don't have an affiliate system, there is no reason for me to import users in my system that are no longer active or don't have any services.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...