コード例 #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
ファイル: shipitem.php プロジェクト: deepeddie/jetscripts
function submitshipmenttojet($oid, $jsondata)
{
    require_once 'HTTP/Request2.php';
    require_once 'AuthAPI.php';
    require_once 'OrdersAPI.php';
    //$LINE_BREAK = "\r\n";
    $LINE_BREAK = "<BR>";
    $authobj = new AuthAPI();
    $authinfo = new AuthInfo();
    $authinfo = $authobj->GetToken();
    $authobj->VerifyToken($authinfo);
    $orderobj = new OrdersAPI();
    $result = $orderobj->PutOrderShipment($authinfo, $oid, $jsondata);
    $strret = "";
    if (strlen($result) > 0) {
        $strret = $strret . "Shipment Error for Order : " . $oid . $LINE_BREAK;
        $strret = $strret . "Error is : " . $result . $LINE_BREAK;
    } else {
        $strret = $strret . "Shipment Order Success " . $LINE_BREAK;
    }
    return $strret;
}
コード例 #3
0
require_once 'HTTP/Request2.php';
require_once 'AuthAPI.php';
require_once 'TaxonomyAPI.php';
require_once 'ProductAPI.php';
require_once 'OrdersAPI.php';
require_once 'ReturnAPI.php';
//$LINE_BREAK = "\r\n";
$LINE_BREAK = "<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;
$oid = $_GET["oid"];
$oitid = $_GET["oitid"];
$filedetails = file_get_contents('acknowledge_template.json');
$allorders = json_decode($filedetails);
$allorders[0]->{"order_items"}[0]->{"order_item_id"} = $oitid;
$result = $orderobj->AcknowledgeOrder($authinfo, $oid, $allorders[0]);
if (strlen($result) > 0) {
コード例 #4
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;
}
コード例 #5
0
ファイル: shiporder.php プロジェクト: deepeddie/jetscripts
require_once 'HTTP/Request2.php';
require_once 'AuthAPI.php';
require_once 'TaxonomyAPI.php';
require_once 'ProductAPI.php';
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.";