Open aryanj723 opened 5 years ago
@aryanj723 You can get a list of orders using this
try {
$amz = new AmazonOrderList("mystore"); //store name matches the array key in the config file
$amz->setLimits('Created', "- 30 days"); //accepts either specific timestamps or relative times
$amz->setFulfillmentChannelFilter("AFN"); //no Amazon-fulfilled orders
$amz->setOrderStatusFilter(
array("Unshipped", "PartiallyShipped", "Canceled", "Unfulfillable")
); //no shipped or pending orders
$amz->setUseToken(); //tells the object to automatically use tokens right away
$amz->fetchOrders(); //this is what actually sends the request
return $amz->getList();
} catch (Exception $ex) {
echo 'There was a problem with the Amazon library. Error: '.$ex->getMessage();
}
And then from that response you can use amazon order id and fetch individual order.
$order = new AmazonOrderItemList("mystore");
$order->setOrderId($orderId);
$order->fetchItems();
return $order->getItems();
Hope that helps Thanks
How to get full info of any order in orderlist, not just these 5 parameters,, I would also like to have info such as state, fulfilment type, and others