Jump to content

Import script (clients and products) froma a csv files.


Recommended Posts

Welcome.

 

We'd like to ask about price of creation of 2 import scripts by whmcs api (import to whmcs database if there will be problems with api)

--------------------------

#1st script

 

We've created client group named Group1 in our whmcs. We'd like to import all clients data from mysql base (231 records)

ofcourse all of them should be as 'Group1' client group, to our whmcs base.

 

There are columns:

 

user_name - account login - NOT NEEDED to import on this step

user_osoba - First Name

user_nazwa - company

user_ulica - street

user_kod - postcode

user_miasto - city

user_nazwa_poczta - NOT NEEDED, could this be imported as line in admin notes for this client?

user_ulica_poczta - NOT NEEDED, could this be imported as line in admin notes for this client?

user_kod_poczta - NOT NEEDED, could this be imported as line in admin notes for this client?

user_miasto_poczta - NOT NEEDED, could this be imported as line in admin notes for this client?

user_nr_sms - vat number - this should be imported to our custom client field called 'nip' it has number 2 on the list of custom fields

user_mail - contact e-mail to owner

password for client area - random

 

#1a - is there a possibility that NOT NEEDED data will be restored as admin notes for client record?

 

#1b - is there a possibility to sent client area welcome e-mail and area details reminder for all clients in this Group1 group? We just want to do this couple days after whole import which shouldn't generate any mails/reminders to mails stored in user_mail.

--------------------------

#2nd script

 

There's second mysql base where are rows:

id - account login (same as user_name in 1st base)

package - package name - already created in our whmcs

price - price which should be imported to package (sometimes default price of package should be override by price from this row)

date - due date of account ( DD/MM/YYYY )

 

This script should create (directadmin as it is set in whmcs) package named 'package' with login account 'id'

overriding price with 'price' and setting up due date 'date', than bind whole package with proper user from Group1 group.

--------------------------

I could merge all those databases so all records will be in one base, such us account login and company name.

Or this could be don through 3rd script, run between 1st and the 2nd, which will take data from 1st base and search for client with proper company name' and than create some default package with login 'user_name'. Than 3rd script will only have to search database for proper account login,

and than it could import all data from 2nd base.

 

 

 

----------------------------------------------

I tried to do this by importcsv script, but our .csv files don't have records such as state, country, last name - those fields should be blank - but api whmcs sends errors that they are required. It could be even modification of importcv if You know what shloud be changed.

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