Post by galbeazaionut » Mon Jul 26, 2021 5:56 pm

Hello,

Which is the best mode for add order in Opencart from external app?
I have an application in Codeigniter and I want add order in Opencart.

$url = "xxxxx";
$params = array(
'key=xxxxxx'
); // this array can contain the any number of parameter you need to send

$parameters = implode('&', $params);

$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch,CURLOPT_POSTFIELDS, $parameters);
//execute post
$result = curl_exec($ch);
//close connection
curl_close($ch);
$result = json_decode($result);
$api_token = $result->api_token;
print_r($api_token);


I used this and I got the api_token.
Where I can find all fields required for insert order?

Thank you!!!

New member

Posts

Joined
Wed Feb 12, 2020 6:52 pm

Post by straightlight » Mon Jul 26, 2021 7:52 pm

We've been there before from the core. This method provides no guarantee from local web service providers. Instead, try with this method: viewtopic.php?f=202&t=220903#p805005 .

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 48 guests