-
Notifications
You must be signed in to change notification settings - Fork 226
Open
Labels
Description
hi
im trying to get the SKU of an order id. im getting blank result with this code. pls help me.
thaks
$list=getAmazonOrderItemList();
echo "Order Id: $ido Details:<hr>";
foreach ($list as $order) {
echo '<b>SKU:</b> '.$order->getSellerSKU();
}
function getAmazonOrderItemList() {
require('../includes/classes.php'); //autoload classes, not needed if composer is being used
try {
$amz = new AmazonOrderItemList("YourAmazonStore"); //store name matches the array key in the config file
$amz->setUseToken(); //tells the object to automatically use tokens right away
$amz ->setOrderId("111-8516083-2753054");
$amz->fetchItems(); //this is what actually sends the request
return $amz->getItems(); //this is what actually sends the request
} catch (Exception $ex) {
echo 'There was a problem with the Amazon library. Error: '.$ex->getMessage();
}
}