Jump to content

Custom field through internal API


andreasa

Recommended Posts

I am trying to insert data in a custom field when adding a new order through the internal API. This is my code - but it's not working:

 

$adminuser = 'xxxxx';

$command = 'addorder';

$values = array('clientid' => $intClientID,

'pid' => '1',

'paymentmethod' => 'paypal',

'domain' => $strDomain,

'domainfields' => base64_encode(serialize(array('subdomain'=>'test2')))

);

$results = localAPI($command,$values,$adminuser);

if ($results['result']!="success") {

echo "An Error Occurred: ".$results['result'];

}

 

Everything works fine - except that nothing gets inserted into the custom field "subdomain". What am I doing wrong?

 

Thanks,

 

Andreas

Link to comment
Share on other sites

  • 4 months later...
  • 2 months later...

I'm try use the code belllow, but the return is empty, but the PID exist!

 

array(2) { ["result"]=> string(7) "success" ["totalresults"]=> int(0) }

 

Whats is the problem?

 

{php}

 

# Set Vars

$command = 'getproducts';

$values = array( 'pid' => '29452');

$adminuser = 'XXXXXXX';

 

# Call API

$results = localAPI($command,$values,$adminuser);

if ($results['result']!="success")

echo "An Error Occurred: ".$results['result'];

 

var_dump($results);

{/php}

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