Prestashop创建订单API
我尝试创建一个API连接,以便通过API在Prestashop中创建订单, 在他们的文件中: 没有关于创建订单的信息,当我尝试自己创建一些东西时,一切都失败了:Prestashop创建订单API,api,prestashop,Api,Prestashop,我尝试创建一个API连接,以便通过API在Prestashop中创建订单, 在他们的文件中: 没有关于创建订单的信息,当我尝试自己创建一些东西时,一切都失败了: $xml = $webService->get(array('url' => 'http://mysite.com/prestashop/api/orders?schema=synopsis')); $resources = $xml -> children() -> children(); $resourc
$xml = $webService->get(array('url' => 'http://mysite.com/prestashop/api/orders?schema=synopsis'));
$resources = $xml -> children() -> children();
$resources->children()->id_address_delivery = 1;
$resources->children()->id_address_invoice = 1;
$resources->children()->id_cart = 1;
$resources->children()->id_currency = 1;
$resources->children()->id_lang = 2;
$resources->children()->id_customer = 1;
$resources->children()->id_carrier = 2;
$resources->children()->total_paid = '1';
$resources->children()->total_paid_real = '1';
$resources->children()->total_products = 1;
$resources->children()->total_products_wt = 1;
$resources->children()->conversion_rate = 0.1;
$resources->children()->module = 'cheque';
$resources->children()->payment = 'Cheque';
$xml = $webService->add(array('resource' => 'orders',
'postXml' => $resources->asXML()
));
给出错误等,这里有没有合适的文档?或者是一个在简单订单中运行的脚本?您需要获取模式,然后返回每行,或者只是手动提供值 下面是获取所选方法的模式的示例
$xml = $webService ->
get(array('url' => 'http://mysite.com/prestashop/api/customers?schema=blank'));
您需要创建客户,地址,购物车,最后创建订单。在创建订单之前,您必须在购物车中放置产品,并且必须设置id\地址\交货和id\地址\发票
您可以在我的博客上阅读更多详细信息的确,这是一个很好的问题,特别是因为Prestashop没有提供任何用于创建新订单/购物车的示例/文档。过程是什么?可能重复的