Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pls help me about AmazonOrderItemList #188

Open
freephpsystems opened this issue Jul 26, 2019 · 1 comment
Open

pls help me about AmazonOrderItemList #188

freephpsystems opened this issue Jul 26, 2019 · 1 comment
Labels

Comments

@freephpsystems
Copy link

freephpsystems commented Jul 26, 2019

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

@Peardian
Copy link
Collaborator

It sounds like this could be the same as #186. Try reading that issue and see if it solves your problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants