php-shopify
php-shopify copied to clipboard
Hi master, regards to u
How can i do to prepare an order with the api.?
Thanks in advance!
@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);