Quantcast
Channel: Opinion: Shopify Community - Shopify Apps
Viewing all articles
Browse latest Browse all 11091

Get order id from order.json by using private app with php by selva

$
0
0

Hi guys..

   I m new to shopify. I m developing my shopify store. Now i created private app by using php for get the order details from my store. still my situation is: when run my private app, it will display all the order details by .json format. now what i m need is , get order id from .json file by loop through in php. What is the best way to get exact solution?.. any one help me?..

My php code:

<?php
require_once 'lib/shopify.php';
$t="4226b767fd10efdcbe234ab0c449eda6";
$sc = new ShopifyClient("https-selvar-myshopify-com.myshopify.com", $t, API_KEY, SECRET);
if(!isset($t))
{
if(!isset($_GET['signature']))
{
      $url = $sc->getAuthorizeUrl("read_orders");
    header('Location: '.$url);
}
if(isset($_GET['code']))
{
    $accTok = $sc->getAccessToken($_GET['code']);
    echo "token=".$accTok;exit;
    $orders = $sc->call('GET', 'admin/orders.json', array('published_status'=>'published'));
    print_r($orders);
}
}
if(isset($t))
{
    $orders = $sc->call('GET', 'admin/orders.json', array('published_status'=>'published'));
    print_r($orders);
}

    
?>

Thank you!.

Best Regards,

selva.


Viewing all articles
Browse latest Browse all 11091

Trending Articles