TommyK Posted May 30, 2012 Share Posted May 30, 2012 Getting no error message or anything, but the info does not save. Anyone see why? $command = 'updateclientproduct'; $values = array('serviceid' => $params["serviceid"], 'customfields' => base64_encode(serialize(array('Fieldname' => "data")))); $adminuser = 'adminusername'; # Call API $results = localAPI($command,$values,$adminuser); if ($results['result']!="success") echo "An Error Occurred: ".$results['result']; return $results['result']; /Tommy 0 Quote Link to comment Share on other sites More sharing options...
TommyK Posted May 30, 2012 Author Share Posted May 30, 2012 I found out my problem. The code in OP is not working. A working example is below; $command = 'updateclientproduct'; $values = array('serviceid' => $params["serviceid"], 'customfields' => base64_encode(serialize(array("3" => "data")))); $adminuser = 'adminusername'; # Call API $results = localAPI($command,$values,$adminuser); if ($results['result']!="success") echo "An Error Occurred: ".$results['result']; return $results['result']; The id of the array values wasn't from 0 to 4 in my case, they were scattered little bit. So I also had to enter Display Order for all of my custom fields on my product. 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.