php-shopify
php-shopify copied to clipboard
Update order status
I can't update the financial status to Paid... But there is already other information, currently updating normally. What can it be?
$q = $shopify->Order(1159668793395)->put(array("financial_status" => "paid"));
The result is an array containing the order information.
I'm having issue with updateing Order fulfillment status $updateInfo = array ( "fulfillment_status" => "fulfilled", );
$shopify->Order($orderID)->put($updateInfo);
Request returns 200, as all fine, but order does not get updated
Am having the same issue as @davordragic . Anyone found a solution to this problem?
It seems that it is not possible to update manually the financial_status nor fulfillment_status of an order directly. Actions need to be maid directly on the Fulfillment or Transaction API as decribred on the link below: https://community.shopify.com/c/Shopify-APIs-SDKs/Order-status-update-using-api/td-p/549497
Have tried a POST on a fulfillment with line_items = { id: 1, quantity: 1} as explained in the documentation but still nothing changed. https://help.shopify.com/en/api/reference/shipping-and-fulfillment/fulfillment?api[version]=2019-04#create-2019-04
Anyone managed it?
For a POST Fulfillment to be successful, you need to provide the "tracking_number". Set it to "null" if you don't have the information, but if you don't provide it then the POST will fail.
Hello, I am able to update the order, but not the fulfillment status, how you do this with phpShopify ?
@SebastienPoncelet @nathanaelmartel
You can use something like this
$shopify->Order($order->order_id)->Fulfillment->post([
"location_id" => $shopify->Location->get()[0]['id'],
"tracking_number" => null,
"tracking_urls" => [],
"notify_customer" => true
]);
@malohtie agreed with your POST tracking information provided. Have done something similar myself. If you can store the Shopify's Fulfillment ID in your DB then you can update it with tracking information later on.
@nathanaelmartel You cannot update manually the fulfillment status. Shopify will define it automatically following the Fulfillment information you'll have provided. It will define if your Fulfillment is:
- Unfulfilled
- Partially fulfilled
- Fulfilled
To get this you have to POST either line items IDs and quantities, with tracking info (NULL if you don't have the data), then the rest is done by itself.
This is related to my answer in this topic #110