Closed c-topherl closed 8 years ago
does this not work?
I just tested it and it does work
Can you show me a sample request that works? I'm getting a blank response. It looks like your $order_id variable is never initialized in get_order_detail.
{ "function":"get_order_detail", "order_id":"14" }
{"response":{"order_details":[]},"status":"success","message":"Order details successfully read"}
fixed. I had changed the code because i was originally returning the details as part of the regular get_orders function, but split them up. also, order_id 14 doesnt have any details, try 13 instead.
Order details is now an object, not an array!
{
"response":{
"order_details":{
"2":{
"id":"2",
"price":"123.99",
"quantity":"10",
"product_id":"2",
"product_code":"joels",
"product_description":"joels favorite beer",
"unit_id":"1",
"unit_code":"jrm",
"unit_description":"joels unit"
},
"3":{
"id":"3",
"price":"123",
"quantity":"10",
"product_id":"3",
"product_code":"porter1",
"product_description":"The #1 porter",
"unit_id":"1",
"unit_code":"jrm",
"unit_description":"joels unit"
}
}
},
"status":"success",
"message":"Order details successfully read"
}
damnit fixed
Works
Implement this.