Jump to content

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


Cody

Recommended Posts

Please note that the latest version of this migrator is included with the latest release of Blesta.

 

 

Instructions

  1. BACK UP YOUR BLESTA DATABASE
  2. If you are not running import manager plugin version 1.0.3 download import_manager_1.0.3.zip and unzip to /plugins/
  3. Unzip the contents of whmcs_migrator_b8.zip to /plugins/import_manager/components/migrators/
  4. You should now have /plugins/import_manager/components/migrators/whmcs/
  5. Go to [settings] > [Company] > [Plugins] and install the Import Manager
  6. Click the Manage button on the Import Manager and proceed through the steps
  7. The migration process may take a while. It imports A LOT of stuff.

 

Data Imported

  1. Staff (including login passwords)
  2. Client Groups
  3. Clients (excluding login passwords)
  4. Credit Card Payment Accounts
  5. Custom Client Fields and Values
  6. Client Notes
  7. Contacts
  8. Tax Rules
  9. Currencies
  10. Invoices
  11. Recurring Invoices
  12. Transactions (partial refunds refund the original and create a new transaction for the difference)
  13. Client Credits
  14. Invoice Credits
  15. Support Departments
  16. Support Tickets (excluding attachments)
  17. Support Predefined Response Categories
  18. Support Predefined Responses
  19. Sent Emails
  20. The following Settings:
    1. Mail Delivery Type
    2. SMTP Host, User, Password, Port, and Security Type
    3. Invoice Days Before Renewal
    4. Invoice Reminder Settings
    5. Auto Debit Days Before Due
    6. Suspend Services After Due
  21. Calendar Events
  22. Products (become packages)
  23. Registrars (become modules/module rows)
  24. Servers (become modules/module rows)
  25. Services
  26. Domains (become services)

Notes

  • All custom pricing overrides will be imported as package pricing potentially creating multiple prices for the same term and currency
  • WHMCS uses plain MD5 passwords for admin users. To enable support for these passwords update (/config/blesta.php)
Configure::set("Blesta.auth_legacy_passwords", false);

to

Configure::set("Blesta.auth_legacy_passwords", true);

What's new in b6

  • Added debugging option.
  • Added check for gmp extension.
  • Added support for refunds.
  • Import refunded invoices as void.

 

What's new in b7

  • Only sets quantity for package if stock conrtrol enabled
  • Extracts all numberic values from ticket ID to better ensure ticket numbers come through

 

What's new in b8

  • Introduced transactions for deferred commits (speed improvements)
  • Now forces UTF-8 connection to WHMCS database to ensure special characters come through

import_manager_1.0.3.zip

whmcs_migrator_b3.zip

whmcs_migrator_b4.zip

whmcs_migrator_b5.zip

whmcs_migrator_b6.zip

whmcs_migrator_b7.zip

whmcs_migrator_b8.zip

Edited by Paul
Updated migrator
Link to comment
Share on other sites

I got this guys:

 

Undefined index: recurring_invoices#0 /home/username/public_html/blesta/plugins/import_manager/components/migrators/whmcs/whmcs_migrator.php(538): UnknownException::setErrorHandler(8, 'Undefined index...', '/home/username/...', 538, Array) #1 /home/username/public_html/blesta/plugins/import_manager/components/migrators/whmcs/whmcs_migrator.php(40): WhmcsMigrator->importInvoices() #2 /home/username/public_html/blesta/plugins/import_manager/models/import_manager_importer.php(113): WhmcsMigrator->import() #3 /home/username/public_html/blesta/plugins/import_manager/controllers/admin_manage_plugin.php(107): ImportManagerImporter->runMigrator('whmcs', '5.2', Array) #4 /home/username/public_html/blesta/app/controllers/admin_company_plugins.php(104): AdminManagePlugin->import() #5 /home/username/public_html/blesta/lib/dispatcher.php(111): AdminCompanyPlugins->manage() #6 /home/username/public_html/blesta/index.php(21): Dispatcher::dispatch('/blesta/admin/s...') #7 {main}
Link to comment
Share on other sites

Hello

Just tried the import, it works!!!

I was unable to map the products since they are different from what I had on WHMCS and the new ones for Blesta, at the end of the import there was some error but when I checked all clients are imported with phone numbers and addresses, so that's great!

Don't forget to allow MySQL connection to connect from the new (blesta) host to the old one (whmcs), also, you will need to make sure that there are not users matching at both sides, the import didn't want to overwrite users from WHMCS to Blesta, so I had to rename the email field on Blesta side....beside that everything works fine.

Thanks a lot!

Link to comment
Share on other sites

CubicWebs, 

You should be able to see the clients in there, also look under invoices, they should be there, not sure is the issue you have is related to recurring invoices, perhaps they will need to match the products assigned to clients....I believe you are not mapping products...right?

Link to comment
Share on other sites

CubicWebs, 

You should be able to see the clients in there, also look under invoices, they should be there, not sure is the issue you have is related to recurring invoices, perhaps they will need to match the products assigned to clients....I believe you are not mapping products...right?

 

I was matching them up to the Blesta ones? did you mate?

Link to comment
Share on other sites

Nope, I didnt, because Im just moving the clients, the plans are different from what I had on WHMCS.

The cool thing here is that I have all invoices imported along with clients info and all that, Im just soft edditing some clients fields and grups in the way I want it, but overall Im very happy with the import....Paul and the guys there did a great job with this module!

Link to comment
Share on other sites

Nope, I didnt, because Im just moving the clients, the plans are different from what I had on WHMCS.

The cool thing here is that I have all invoices imported along with clients info and all that, Im just soft edditing some clients fields and grups in the way I want it, but overall Im very happy with the import....Paul and the guys there did a great job with this module!

 

Must be because I went down that road :s

Link to comment
Share on other sites

I got this guys:

 

Undefined index: recurring_invoices#0 /home/username/public_html/blesta/plugins/import_manager/components/migrators/whmcs/whmcs_migrator.php(538): 

 

Change line 536 of whmcs_migrator.php...

 

from:

 

 

 

to:

 

 
        if (!isset($this->mappings['recurring_invoices']))
            return;
Link to comment
Share on other sites

Yes it still hates me on this bit I got in the video:

 

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'amount' cannot be null#0 /home/ctriotol/public_html/blesta/lib/model.php(124): PDOStatement->execute(Array) #1 /home/ctriotol/public_html/blesta/components/record/record.php(215): Model->query('INSERT INTO `tr...', Array) #2 /home/ctriotol/public_html/blesta/app/models/transactions.php(53): Record->insert('transactions', Array, Array) #3 /home/ctriotol/public_html/blesta/plugins/import_manager/components/migrators/migrator.php(218): Transactions->add(Array) #4 /home/ctriotol/public_html/blesta/plugins/import_manager/components/migrators/whmcs/whmcs_migrator.php(615): Migrator->addTransaction(Array, '85') #5 /home/ctriotol/public_html/blesta/plugins/import_manager/components/migrators/whmcs/whmcs_migrator.php(40): WhmcsMigrator->importTransactions() #6 /home/ctriotol/public_html/blesta/plugins/import_manager/models/import_manager_importer.php(113): WhmcsMigrator->import() #7 /home/ctriotol/public_html/blesta/plugins/import_manager/controllers/admin_manage_plugin.php(107): ImportManagerImporter->runMigrator('whmcs', '5.2', Array) #8 /home/ctriotol/public_html/blesta/app/controllers/admin_company_plugins.php(104): AdminManagePlugin->import() #9 /home/ctriotol/public_html/blesta/lib/dispatcher.php(111): AdminCompanyPlugins->manage() #10 /home/ctriotol/public_html/blesta/index.php(21): Dispatcher::dispatch('/blesta/admin/s...') #11 {main}
Link to comment
Share on other sites

Yes it still hates me on this bit I got in the video:

 

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'amount' cannot be null#0 /home/ctriotol/public_html/blesta/lib/model.php(124): PDOStatement->execute(Array) #1 /home/ctriotol/public_html/blesta/components/record/record.php(215): Model->query('INSERT INTO `tr...', Array) #2 /home/ctriotol/public_html/blesta/app/models/transactions.php(53): Record->insert('transactions', Array, Array) #3 /home/ctriotol/public_html/blesta/plugins/import_manager/components/migrators/migrator.php(218): Transactions->add(Array) #4 /home/ctriotol/public_html/blesta/plugins/import_manager/components/migrators/whmcs/whmcs_migrator.php(615): Migrator->addTransaction(Array, '85') #5 /home/ctriotol/public_html/blesta/plugins/import_manager/components/migrators/whmcs/whmcs_migrator.php(40): WhmcsMigrator->importTransactions()

 

Try changing line 609, or there abouts, of whmcs_migrator.php:

 

from:

 

                'amount' => $transaction->credit,

 

to:

 

                'amount' => $credit->credit,
Link to comment
Share on other sites

Try changing line 609, or there abouts, of whmcs_migrator.php:

 

from:

 

 

                'amount' => $transaction->credit,

 

to:

 

 

                'amount' => $credit->credit,

 

I get this error now mate, is this something on the server side I can fix or aren't these server issues? because they seem to start with the same beginning SQLSTATE[Number]

 

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'staff_id' cannot be null#0 /home/ctriotol/public_html/blesta/lib/model.php(124): PDOStatement->execute(Array) #1 /home/ctriotol/public_html/blesta/components/record/record.php(215): Model->query('INSERT INTO `su...', Array) #2 /home/ctriotol/public_html/blesta/plugins/import_manager/components/migrators/whmcs/whmcs_migrator.php(679): Record->insert('support_staff_d...', Array) #3 /home/ctriotol/public_html/blesta/plugins/import_manager/components/migrators/whmcs/whmcs_migrator.php(40): WhmcsMigrator->importSupportDepartments() #4 /home/ctriotol/public_html/blesta/plugins/import_manager/models/import_manager_importer.php(113): WhmcsMigrator->import() #5 /home/ctriotol/public_html/blesta/plugins/import_manager/controllers/admin_manage_plugin.php(107): ImportManagerImporter->runMigrator('whmcs', '5.2', Array) #6 /home/ctriotol/public_html/blesta/app/controllers/admin_company_plugins.php(104): AdminManagePlugin->import() #7 /home/ctriotol/public_html/blesta/lib/dispatcher.php(111): AdminCompanyPlugins->manage() #8 /home/ctriotol/public_html/blesta/index.php(21): Dispatcher::dispatch('/blesta/admin/s...') #9 {main}
Link to comment
Share on other sites

I get this error now mate, is this something on the server side I can fix or aren't these server issues? because they seem to start with the same beginning SQLSTATE[Number]

 

These look like importer issues--some insert/update is trying to set a null value for a field that cannot be null. It's good you're finding these so the importer can be made more robust.

Link to comment
Share on other sites

Doesn't seem to be working for me... I've got a fresh Blesta 3.0.2 install, no packages or config done. Ran the importer and got a warning about having to create packages before I could map them. I clicked Continue and got this:

 

Oh noes!

Undefined index: remote_packages on line 107 in /home/castleco/public_html/_blesta_test/public_html/plugins/import_manager/components/migrators/whmcs/5.2/whmcs5_2.php

 

 

:(

Link to comment
Share on other sites

Will you be adding the ability to import packages?

 

If so, I'd love to see it import the recurring price as well.  The discounts in WHMCS generally apply to the entire package, so if I have an $85 VPS + $20 cPanel + 20% coupon code, that's 20% off $105 = $84.  Because our setup in Blesta is going to be a little different, and because we're grandfathering old prices, I was planning on creating a custom package for each imported package that contains a discount.  Needless to say this is going to be a little time consuming, so having Blesta do it automatically would be great.

Link to comment
Share on other sites

Will you be adding the ability to import packages?

 

If so, I'd love to see it import the recurring price as well.  The discounts in WHMCS generally apply to the entire package, so if I have an $85 VPS + $20 cPanel + 20% coupon code, that's 20% off $105 = $84.  Because our setup in Blesta is going to be a little different, and because we're grandfathering old prices, I was planning on creating a custom package for each imported package that contains a discount.  Needless to say this is going to be a little time consuming, so having Blesta do it automatically would be great.

 

I believe that's going in the final one mate :) as they are adding more features. You should be able to match packages too. So if you make custom packages you can match them to the new one.

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...