Jump to content

DirectI domain import script


Recommended Posts

  • 4 weeks later...

I have resolved this very easy:

 

1) List all customers

2) List all domains via "Renewal management"

3) Join these two lists into one (key: Customer ID)

4) Create mysql table on localhost and insert all data into this table

5) Copy whmcs mysql database to localhost

6) Create and run php script to create a file with sql query (Key: Email address)

7) Execute sql query on the server whmcs database

8) Ta-da, done, all domains are under whmcs. :D

Link to comment
Share on other sites

I have resolved this very easy:

 

1) List all customers

2) List all domains via "Renewal management"

3) Join these two lists into one (key: Customer ID)

4) Create mysql table on localhost and insert all data into this table

5) Copy whmcs mysql database to localhost

6) Create and run php script to create a file with sql query (Key: Email address)

7) Execute sql query on the server whmcs database

8) Ta-da, done, all domains are under whmcs. :D

 

Hey looks interesting, do post a copy here we could all use it.

Link to comment
Share on other sites

  • 3 weeks later...

Hello,

 

Sorry for delay.

Here is my script for importing DirectI domains to WHMCS.

 

First of all, it's expected that you have whmcs database on you locally comp.

Execute "directi-table.sql" file on your localhost whmcs database.

 

Then you must manually copy all directi users and create sql query to import "userid" and user "email" into table "mailovi".

Then do the same with domains (Renewal Management, expiring in next 500 days), create sql to import:

"uid" - Customer Id

"domena" - Domain Name

"rok" - Expiry Date (format "m-d-Y") (here you will need search&replace because on the DirectI page date is displayed in "M j, Y" format)

 

Then insert emails from the table "mailovi.mail" to table "directi.mail" - join table "directi" and "mailovi", key is field "uid".

 

Now you can run .php script to create .sql file that you will execute on the whmcs database.

 

Open phpMyAdmin, select whmcs database, click on import and browse for the "transfer_directi.sql" file.

 

I have imported about 900 domains in a few seconds without any problem.

 

ATT: script will import only domains where directi.mail = tblclients.email

 

Regards

DirectI import domain script - www.studio4web.com.zip

Link to comment
Share on other sites

  • 2 weeks later...

Copy/Paste from directi page (Renewal Management, expiring in next 500 days) into notepad, replace all blank (tab) filelds with semicolon or comma, Expiry Date (format "m-d-Y") (here you will need search&replace because on the DirectI page date is displayed in "M j, Y" format) and save to .csv or .txt, then open file in Excel and select semicolon/comma as separator, delete all unnecessary datas (leave customer ID, domain name and expiry date) then you can easily create sql query to insert all domains into a proper mysql database.

 

Field A: INSERT INTO directi VALUES ('

Field B: customer ID

Field C: ', '

Field D: domain_name

Field E: ', '

Field F: expiry_date

Field G: ','');

 

And then you have something like:

INSERT INTO directi VALUES ('customer id', 'domain_name', 'expiry_date','');

 

Now just copy fileds A, C, E and G across to last row.

Save to .sql file and just execute under phpMyAdmin.

Link to comment
Share on other sites

  • 4 months later...

Hi Miron,

 

I did as you have suggested, but since script will import only domains where directi.mail = tblclients.email does it mean i have to populate the tblclients.email first? if not then the tbclients will be empty if it is a new setup and the script will not work when it compares wihth directi.mail?

 

thank you

cheers

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated