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

list orders #27

Open
aryanj723 opened this issue May 30, 2019 · 1 comment
Open

list orders #27

aryanj723 opened this issue May 30, 2019 · 1 comment

Comments

@aryanj723
Copy link

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

@Dhavalptel
Copy link

@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

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

No branches or pull requests

2 participants