Jump to content

Problem with my import script, could use a second pair of eyes


BarrySDCA

Recommended Posts

I am trying to import orders from our old system to the new WHMCS. I have spent considerable time getting the subscriptions into a table I can use to import into whmcs. My problem is the custom fields and configurable options are not registering in the order. they are simply blank. I'm sure that I'm coding somethign wrong here but can't find it. little help please? thank you

 

...it's simply looping through a db table here and populating $row..this works ok

 

 

$postfields["clientid"] = 71; #$row{'account_no'};

$postfields["pid"] = $row{'newplanid'};

$postfields["billingcycle"] = $row{'billingcycle'};

 

$customfields['Language'] = $row{'Language'};

If ($customfields['Language'] = "") {

$customfields['Language'] = "English";

}

 

$customfields['OS'] = $row{'OS'};

$customfields['Datacenter'] = $row{'DATACENTER'};

 

 

$configoptions['RAM (MB)'] = $row{'RAM'};

$configoptions['DISK (GB)'] = $row{'DISK'};

$configoptions['Number of IP Addresses'] = $row{'numIP'};

 

print_r ($configoptions); <--- these show they are populate correct, but are not listed in the whmcs order...why not???

print_r ($customfields);

 

 

 

$postfields["configoptions"] = base64_encode(serialize($configoptions));

$postfields["customfields"] = base64_encode(serialize($customfields));

$postfields["paymentmethod"] = "payflowpro";

 

 

$postfields["noinvoice"] = true;

$postfields["noemail"] = true;

 

$whmcsresult = AddtoWHMCS($postfields); <--- my function that actually pushes the order

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