oderland-david Posted September 30, 2010 Share Posted September 30, 2010 (edited) Hi! Just started modifying the ajax order form to fit our needs and am getting stumped by trying to insert data into the customfields for a client. I've created the custom field in whmcs admin and it's got ID: 8 in tblcustomfields and I've modified the addClient function call in index.php of the ajax order form: $userid = addClient($firstname,$lastname,$companyname,$email,$address1,$address2,$city,$state,$postcode,$country,$phonenumber,$password1,'','','','','','','','',base64_encode(serialize(array("8"=>$orgno)))); I'm not quite sure if I'm using the right attributes for addClient since those functions are encrypted (is there anywhere one could see some phpdoc for classes and methods?) - but I've followed the "order" of the addclient API call. Should I just remove that line and go with an API call right off? Edited September 30, 2010 by oderland-david 0 Quote Link to comment Share on other sites More sharing options...
oderland-david Posted September 30, 2010 Author Share Posted September 30, 2010 Solved it with a workaround. Created an api class and used it inside index.php to call updateclient and added the customfields values right after the function call mentioned below with the returned userid. Hi! Just started modifying the ajax order form to fit our needs and am getting stumped by trying to insert data into the customfields for a client. I've created the custom field in whmcs admin and it's got ID: 8 in tblcustomfields and I've modified the addClient function call in index.php of the ajax order form: $userid = addClient($firstname,$lastname,$companyname,$email,$address1,$address2,$city,$state,$postcode,$country,$phonenumber,$password1,'','','','','','','','',base64_encode(serialize(array("8"=>$orgno)))); I'm not quite sure if I'm using the right attributes for addClient since those functions are encrypted (is there anywhere one could see some phpdoc for classes and methods?) - but I've followed the "order" of the addclient API call. Should I just remove that line and go with an API call right off? 0 Quote Link to comment Share on other sites More sharing options...
keliweb Posted November 9, 2010 Share Posted November 9, 2010 Hi, how i can use the custom fields on ajax cart ??? I don't understand how i can display and insert to the client after checkuot. Regards. 0 Quote Link to comment Share on other sites More sharing options...
oderland-david Posted November 9, 2010 Author Share Posted November 9, 2010 Hi, With some general php coding knowledge you should be able to modify the index.php file to include steps to modify the client after it has been added. Check the wiki: http://wiki.whmcs.com/API:Example_Usage http://wiki.whmcs.com/API:Update_Client Otherwise you'll just have to wait until they release a new version of the order form or find someone who can help you with it. Hi, how i can use the custom fields on ajax cart ??? I don't understand how i can display and insert to the client after checkuot. Regards. 0 Quote Link to comment Share on other sites More sharing options...
markos Posted November 12, 2010 Share Posted November 12, 2010 Solved it with a workaround.Created an api class and used it inside index.php to call updateclient and added the customfields values right after the function call mentioned below with the returned userid. Can you post the solution how you solved it , thanks 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.