Commit 3f91b64e authored by Kulya's avatar Kulya 😊

Upd alvbx add sect1

parent 37677da3
...@@ -459,10 +459,9 @@ class AloVoiceRest ...@@ -459,10 +459,9 @@ class AloVoiceRest
} }
private function bx_get_product_section($name='') { private function bx_get_product_section($name='') {
$name='BOOKS';
$conf = self::get_billzconf(); $conf = self::get_billzconf();
$result = false; $result = false;
if(!empty($conf["bx_catalog_id"])){ if(!empty($name) && !empty($conf["bx_catalog_id"])){
$res = BxRest::call("catalog.section.list",[ $res = BxRest::call("catalog.section.list",[
// "select"=>[], // "select"=>[],
"filter"=>[ "filter"=>[
...@@ -480,6 +479,7 @@ class AloVoiceRest ...@@ -480,6 +479,7 @@ class AloVoiceRest
} }
private function bx_add_product_section($name,$parent_id=false) { private function bx_add_product_section($name,$parent_id=false) {
if(empty($name)){ return false; }
$conf = self::get_billzconf(); $conf = self::get_billzconf();
$result = false; $result = false;
if(!empty($conf["bx_catalog_id"])){ if(!empty($conf["bx_catalog_id"])){
...@@ -491,7 +491,10 @@ class AloVoiceRest ...@@ -491,7 +491,10 @@ class AloVoiceRest
if(!empty($parent_id) && is_numeric($parent_id)){ if(!empty($parent_id) && is_numeric($parent_id)){
$addParams["iblockSectionId"] = $parent_id; $addParams["iblockSectionId"] = $parent_id;
} }
$result = BxRest::call("catalog.section.add",["fields"=>$addParams]); $res = BxRest::call("catalog.section.add",["fields"=>$addParams]);
if(!empty($res["result"])){
$result = $res["result"];
}
} }
return $result; return $result;
......
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