Skip to content

pls help me about AmazonOrderItemList #188

@freephpsystems

Description

@freephpsystems

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();
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions