Commit 3f91b64e authored by Kulya's avatar Kulya 😊

Upd alvbx add sect1

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