php-shopify icon indicating copy to clipboard operation
php-shopify copied to clipboard

Hi master, regards to u

Open duqkefly opened this issue 3 years ago • 1 comments

How can i do to prepare an order with the api.?

Thanks in advance!

duqkefly avatar Apr 23 '21 02:04 duqkefly

@duqkefly

the README.md has an example of how to create an order. I assume you already have installed and imported the library to your project, the only thing you have to do is invoke the $shopify->Order->post($params);

here you have the full example of how to use it:

$order = array (
    "email" => "[email protected]",
    "fulfillment_status" => "unfulfilled",
    "line_items" => [
      [
          "variant_id" => 27535413959,
          "quantity" => 5
      ]
    ]
);

$shopify->Order->post($order);

joseph-sx avatar Jul 31 '21 02:07 joseph-sx