Commit 61234b47 authored by Kulya's avatar Kulya 😊

Upd alvbx add prods7

parent 999200b8
......@@ -359,9 +359,12 @@ class AloVoiceRest
if(empty($data)){
return false;
}
$conf = self::get_billzconf();
$currency = 'UZS';
$result = false;
if(!empty($conf["bx_catalog_id"])){
$arProduct = [];
......@@ -387,7 +390,7 @@ class AloVoiceRest
"name" => $data["name"],
"code" => $this->translit($data["name"]),
"xmlId" => $xmlId,
"iblockSectionId" => (!empty($data["price"])) ? $data["sid"] : 0,
"iblockSectionId" => (!empty($data["sid"])) ? $data["sid"] : 0,
"quantity" => (!empty($data["qty"])) ? $data["qty"] : 0,
"quantityTrace" => 'N',
];
......@@ -429,6 +432,8 @@ class AloVoiceRest
if($ik==0){
$arNewProductParams["previewPicture"] = $arPic;
$arPic["value"]["fileData"][1] = 'data:image/' . $arImage["extension"] . ';base64,' . $arImage["base64"];
$arNewProductParams["detailPicture"] = $arPic;
}
elseif($ik==1){
$arNewProductParams["detailPicture"] = $arPic;
......@@ -437,6 +442,8 @@ class AloVoiceRest
}
}
BillzRest::setLog($arNewProductParams);
$arProduct = BxRest::call('catalog.product.add',["fields"=>$arNewProductParams]);
}
}
......@@ -455,6 +462,7 @@ class AloVoiceRest
$return = [
'name' => $arInfo["basename"],
'base64' => $data,
'extension' => $arInfo["extension"],
];
return $return;
......
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