TL; DR
无法按product_id
筛选订单。用作参数时,整个请求的答案是HTTP400。
因此,我想获取特定产品的订单总数。还有其他方法可以实现吗?
我使用的是官方PrestaShopWebservice
类,我的查询如下所示:
$xmlResponse = $webService->get(
[
'resource' => 'orders',
'display' => 'full',
'output_format' => 'JSON',
'filter[product_id]' => $id,
'filter[valid]' => 1
]
);
我得到的错误:
Fatal error: Uncaught PrestaShopWebserviceException: This call to PrestaShop Web Services failed and returned an HTTP status of 400. That means: Bad Request.
非常感谢! :)