コード例 #1
0
function GetAllOrders($status)
{
    global $authinfo;
    $orderobj = new OrdersAPI();
    $allordernodes = $orderobj->GetAllOrdersNodes($authinfo, $status);
    $json_str = json_encode($allordernodes, JSON_PRETTY_PRINT);
    //var_dump($json_str);
    return $allordernodes;
}
コード例 #2
0
function GetCompleteOrders()
{
    global $authinfo;
    global $LINE_BREAK;
    $strhtml = "";
    $strhtml = $strhtml . $LINE_BREAK . $LINE_BREAK;
    $orderobj = new OrdersAPI();
    $allordernodes = $orderobj->GetAllOrdersNodes($authinfo, 'complete');
    $json_str = json_encode($allordernodes, JSON_PRETTY_PRINT);
    //var_dump($json_str);
    if (count($allordernodes) > 0) {
        $strhtml = $strhtml . "Complete Order IDs : ";
    } else {
        $strhtml = $strhtml . "No New Complete Orders.";
    }
    $strhtml = $strhtml . $LINE_BREAK . $LINE_BREAK;
    foreach ($allordernodes as $orderid => $oneordernode) {
        $strhtml = $strhtml . $LINE_BREAK;
        $strhtml = $strhtml . "<DIV>";
        //var_dump($oneordernode);
        $strhtml = $strhtml . "OrderId : " . $orderid . $LINE_BREAK;
        $strhtml = $strhtml . "Order place date : " . $oneordernode->{"order_placed_date"} . $LINE_BREAK;
        foreach ($oneordernode->{"order_items"} as $oneorderitemnode) {
            $strhtml = $strhtml . "<DIV>";
            $strhtml = $strhtml . "order_item_id : " . $oneorderitemnode->{"order_item_id"} . $LINE_BREAK;
            $strhtml = $strhtml . "merchant_sku : " . $oneorderitemnode->{"merchant_sku"} . $LINE_BREAK;
            $strhtml = $strhtml . "quanitity : " . $oneorderitemnode->{"request_order_quantity"} . $LINE_BREAK;
            $strhtml = $strhtml . $LINE_BREAK;
            $strhtml = $strhtml . "</DIV>";
        }
        $strhtml = $strhtml . "</DIV>";
    }
    return $strhtml;
}
コード例 #3
0
ファイル: shiporder.php プロジェクト: deepeddie/jetscripts
require_once 'OrdersAPI.php';
require_once 'ReturnAPI.php';
$LINE_BREAK = "\r\n";
//"<BR>"
$authobj = new AuthAPI();
$authinfo = new AuthInfo();
$authinfo = $authobj->GetToken();
$authobj->VerifyToken($authinfo);
$taxobj = new TaxonomyAPI();
$productobj = new ProductAPI();
$orderobj = new OrdersAPI();
$returnobj = new ReturnAPI();
$currdir = getcwd();
$exportdir = $currdir . '/../var/export';
$prodinfofilename = $exportdir . '/jet-prodinfo.json';
$prodconfigurablefilename = $exportdir . '/jet-prodconfigurable.json';
$prodpricefilename = $exportdir . '/jet-prodprice.json';
$prodinventoryfilename = $exportdir . '/jet-prodinventory.json';
echo $LINE_BREAK . $LINE_BREAK;
$result = '';
$allorderids = $orderobj->GetAllOrdersNodes($authinfo);
echo $LINE_BREAK . $LINE_BREAK;
if (count($allorderids) > 0) {
    echo "Ready Order IDs : ";
} else {
    echo "No New Ready Orders.";
}
foreach ($allorderids as $oneorderid) {
    echo $LINE_BREAK;
    echo "OrderId : " . $oneorderid . $LINE_BREAK;
}