Here is my code for updating order status in shopping cart to Checkout: Checkout. After running no error but it does not show order status as Checkout: Checkout.
function commerce_services_order_checkout_update($order_id,$data, $flatten_fields) {
$status; $message;
$status = $data['status'];
$order = commerce_order_load($order_id);
$order = commerce_order_status_update($order, "Checkout: Checkout");
if($order != null){
$status = 1;
$message = "Order status set to checkout successfully.";
}else{
$status = 0;
$message = "Order status can not set to checkout.";
}
$reply= (array('status' => $status,'message' => $message, "order status ". $order));
return $reply;
}
Any suggestion is greatly appreciated!
Thanks