Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AmiBX
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bitrix
AmiBX
Commits
820fca9c
Commit
820fca9c
authored
Dec 09, 2021
by
Kulya
😊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upd alvbx add sect3
parent
24d7b958
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
AloVoiceRest.php
vendor/alovoice/src/AloVoiceRest.php
+19
-1
No files found.
vendor/alovoice/src/AloVoiceRest.php
View file @
820fca9c
...
...
@@ -485,12 +485,13 @@ class AloVoiceRest
if
(
!
empty
(
$conf
[
"bx_catalog_id"
])){
$addParams
=
[
"iblockId"
=>
$conf
[
"bx_catalog_id"
],
"name"
=>
$name
,
"name"
=>
translit
(
$name
)
,
// "code": 'news'
];
if
(
!
empty
(
$parent_id
)
&&
is_numeric
(
$parent_id
)){
$addParams
[
"iblockSectionId"
]
=
$parent_id
;
}
var_dump
(
$addParams
);
$res
=
BxRest
::
call
(
"catalog.section.add"
,[
"fields"
=>
$addParams
]);
if
(
!
empty
(
$res
[
"result"
])){
$result
=
$res
[
"result"
];
...
...
@@ -507,6 +508,23 @@ class AloVoiceRest
return
$this
->
bx_add_product_section
(
$r
[
0
]);
}
private
function
translit
(
$t
=
false
)
{
$cyr
=
array
(
'а'
,
'б'
,
'в'
,
'г'
,
'д'
,
'е'
,
'ё'
,
'ж'
,
'з'
,
'и'
,
'й'
,
'к'
,
'л'
,
'м'
,
'н'
,
'о'
,
'п'
,
'р'
,
'с'
,
'т'
,
'у'
,
'ф'
,
'х'
,
'ц'
,
'ч'
,
'ш'
,
'щ'
,
'ъ'
,
'ы'
,
'ь'
,
'э'
,
'ю'
,
'я'
,
'А'
,
'Б'
,
'В'
,
'Г'
,
'Д'
,
'Е'
,
'Ё'
,
'Ж'
,
'З'
,
'И'
,
'Й'
,
'К'
,
'Л'
,
'М'
,
'Н'
,
'О'
,
'П'
,
'Р'
,
'С'
,
'Т'
,
'У'
,
'Ф'
,
'Х'
,
'Ц'
,
'Ч'
,
'Ш'
,
'Щ'
,
'Ъ'
,
'Ы'
,
'Ь'
,
'Э'
,
'Ю'
,
'Я'
);
$lat
=
array
(
'a'
,
'b'
,
'v'
,
'g'
,
'd'
,
'e'
,
'e'
,
'zh'
,
'z'
,
'i'
,
'y'
,
'k'
,
'l'
,
'm'
,
'n'
,
'o'
,
'p'
,
'r'
,
's'
,
't'
,
'u'
,
'f'
,
'h'
,
'ts'
,
'ch'
,
'sh'
,
'sht'
,
'i'
,
'y'
,
'y'
,
'e'
,
'yu'
,
'ya'
,
'A'
,
'B'
,
'V'
,
'G'
,
'D'
,
'E'
,
'E'
,
'Zh'
,
'Z'
,
'I'
,
'Y'
,
'K'
,
'L'
,
'M'
,
'N'
,
'O'
,
'P'
,
'R'
,
'S'
,
'T'
,
'U'
,
'F'
,
'H'
,
'Ts'
,
'Ch'
,
'Sh'
,
'Sht'
,
'I'
,
'Y'
,
'Y'
,
'E'
,
'Yu'
,
'Ya'
);
$textlat
=
str_replace
(
$cyr
,
$lat
,
$t
);
// $textlat = str_replace($lat, $cyr, $textlat);
$textlat
=
str_replace
(
" "
,
"_"
,
$textlat
);
return
$textlat
;
}
private
function
billz_catalog_infos_synch_OLD
(
$r
=
false
)
{
$p
=
1
;
$ps
=
10
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment