Jump to content

API Product custom fields not updating


hcaz

Recommended Posts

Hello,

I have WHMCS running and it all works fine, I have a load of products setup ect and orders procees okay. I have a script on the server that logges in using the WHMCS API to change the product user and password aswell as a custom feild. It works fine to update the username and password for the product it just does not update the cusom feild, i have even tried it as a seperate api call just for the custom feilds to no avail. Here is the different peices of code i have tried:

 

$postfields3["action"] = "updateclientproduct";
$postfields3["serviceid"] = "88"; //product ID
$postfields3["customfield[2]"] = "test";
print_r(sendRequest($postfields3)); //Says it worked successfully

 

$postfields3["action"] = "updateclientproduct";
$postfields3["serviceid"] = "88"; //product ID
$postfields3["customfields"] = base64_encode(serialize(array("2"=>"test")));
print_r(sendRequest($postfields3)); //Says it worked successfully

 

I have tried other combinations of different numbers to see if it was just that custom field, as-well as using the field name but nothing works the field just says at its set value.

 

Thanks for any help because i have tried everything i can think of and and at a loss,

Zachary

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