Commit bb2fb594 authored by Kulya's avatar Kulya 😊

Order creat func 5

parent bfe1b11e
...@@ -672,12 +672,14 @@ class AloVoiceRest ...@@ -672,12 +672,14 @@ class AloVoiceRest
$arOrderProducts = []; $arOrderProducts = [];
foreach($arProducts as $oprd){ foreach($arProducts as $oprd){
var_dump($oprd); $arPrdRes = BxRest::call('catalog.product.get',["id"=>$oprd["productId"]]);
var_dump("--------------------------------"); if(!empty($arPrdRes["result"]["product"])){
$xmlId = $arPrdRes["result"]["product"]["xmlId"];
}
$arOrderProducts[] = [ $arOrderProducts[] = [
"office_id" => $officeId, "office_id" => $officeId,
"id" => (int)$oprd["productId"], "id" => (int)$oprd["productId"],
"billz_id" => (int)$oprd["productXmlId"], "billz_id" => (int)$xmlId,
"quantity" => (int)$oprd["quantity"], "quantity" => (int)$oprd["quantity"],
"price" => (int)$oprd["price"], "price" => (int)$oprd["price"],
"discount" =>(int)$oprd["discountPrice"] "discount" =>(int)$oprd["discountPrice"]
...@@ -693,8 +695,6 @@ class AloVoiceRest ...@@ -693,8 +695,6 @@ class AloVoiceRest
]; ];
$arResOrders[] = BillzRest::createOrder($arOrderParams); $arResOrders[] = BillzRest::createOrder($arOrderParams);
} }
} }
......
{"billz_productfields":{"ID":"ID","name":"\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435","sku":"\u0410\u0440\u0442\u0438\u043a\u0443\u043b\u044c","barCode":"\u0411\u0430\u0440\u043a\u043e\u0434","price":"\u0426\u0435\u043d\u0430","priceUSD":"\u0426\u0435\u043d\u0430USD","discountAmount":"\u0421\u043a\u0438\u0434\u043a\u0430","qty":"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e",".imageUrls":"\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",".offices":"\u0412 \u0441\u043a\u043b\u0430\u0434\u0430\u0445","properties_BRAND":"BRAND","properties_CATEGORY":"CATEGORY","properties_COLOR":"COLOR","properties_DESCRIPTION":"DESCRIPTION","properties_SIZE":"SIZE","properties_SUB_CATEGORY":"SUB_CATEGORY","properties_\u0410\u0412\u0422\u041e\u0420":"\u0410\u0412\u0422\u041e\u0420","properties_\u0412\u0415\u0421":"\u0412\u0415\u0421","properties_\u0415\u0414\u0418\u041d\u0418\u0426\u0410_\u0418\u0417\u041c\u0415\u0420\u0415\u041d\u0418\u042f":"\u0415\u0414\u0418\u041d\u0418\u0426\u0410_\u0418\u0417\u041c\u0415\u0420\u0415\u041d\u0418\u042f","properties_\u0417\u0410\u041f\u0410\u0425\u0418":"\u0417\u0410\u041f\u0410\u0425\u0418","properties_\u0418\u0417\u0414\u0410\u0422\u0415\u041b\u042c\u0421\u0422\u0412\u041e":"\u0418\u0417\u0414\u0410\u0422\u0415\u041b\u042c\u0421\u0422\u0412\u041e","properties_\u041a\u041e\u041b_\u0412\u041e_\u0412_\u0423\u041f\u0410\u041a\u041e\u0412\u041a\u0415":"\u041a\u041e\u041b_\u0412\u041e_\u0412_\u0423\u041f\u0410\u041a\u041e\u0412\u041a\u0415","properties_\u041a\u041e\u041b\u0418\u0427\u0415\u0421\u0422\u0412\u041e_\u0421\u0422\u0420\u0410\u041d\u0418\u0426":"\u041a\u041e\u041b\u0418\u0427\u0415\u0421\u0422\u0412\u041e_\u0421\u0422\u0420\u0410\u041d\u0418\u0426","properties_\u041d\u0410\u041f\u0420\u0410\u0412\u041b\u0415\u041d\u0418\u0415":"\u041d\u0410\u041f\u0420\u0410\u0412\u041b\u0415\u041d\u0418\u0415","properties_\u041f\u0415\u0420\u0415\u0412\u041e\u0414\u0427\u0418\u041a":"\u041f\u0415\u0420\u0415\u0412\u041e\u0414\u0427\u0418\u041a","properties_\u041f\u041e\u0414\u041a\u0410\u0422\u0415\u0413\u041e\u0420\u0418\u042f2":"\u041f\u041e\u0414\u041a\u0410\u0422\u0415\u0413\u041e\u0420\u0418\u042f2","properties_\u041f\u041e\u0421\u0422\u0410\u0412\u0429\u0418\u041a":"\u041f\u041e\u0421\u0422\u0410\u0412\u0429\u0418\u041a","properties_\u041f\u0420\u041e\u0418\u0417\u0412\u041e\u0414\u0418\u0422\u0415\u041b\u042c":"\u041f\u0420\u041e\u0418\u0417\u0412\u041e\u0414\u0418\u0422\u0415\u041b\u042c","properties_\u0421\u0415\u0420\u0422\u0418\u0424\u0418\u041a\u0410\u0422":"\u0421\u0415\u0420\u0422\u0418\u0424\u0418\u041a\u0410\u0422","properties_\u0421\u041e\u0421\u0422\u0410\u0412":"\u0421\u041e\u0421\u0422\u0410\u0412","properties_\u0421\u041f\u041e\u0421\u041e\u0411_\u041f\u0420\u0418\u041c\u0415\u041d\u0415\u041d\u0418\u042f":"\u0421\u041f\u041e\u0421\u041e\u0411_\u041f\u0420\u0418\u041c\u0415\u041d\u0415\u041d\u0418\u042f","properties_\u0422\u0418\u041f_\u041e\u0411\u041b\u041e\u0416\u041a\u0418":"\u0422\u0418\u041f_\u041e\u0411\u041b\u041e\u0416\u041a\u0418"}} {"billz_productfields":{"ID":"ID","name":"\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435","sku":"\u0410\u0440\u0442\u0438\u043a\u0443\u043b\u044c","barCode":"\u0411\u0430\u0440\u043a\u043e\u0434","price":"\u0426\u0435\u043d\u0430","priceUSD":"\u0426\u0435\u043d\u0430USD","discountAmount":"\u0421\u043a\u0438\u0434\u043a\u0430","qty":"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e",".imageUrls":"\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",".offices":"\u0412 \u0441\u043a\u043b\u0430\u0434\u0430\u0445"}}
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment