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
162f8ca7
Commit
162f8ca7
authored
Dec 10, 2021
by
Kulya
😊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upd alvbx add Products Synch Changed
parent
5270965a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
AloVoiceRest.php
vendor/alovoice/src/AloVoiceRest.php
+19
-2
No files found.
vendor/alovoice/src/AloVoiceRest.php
View file @
162f8ca7
...
@@ -563,6 +563,8 @@ class AloVoiceRest
...
@@ -563,6 +563,8 @@ class AloVoiceRest
];
];
echo
"Загрузка данных из Billz..."
;
$sdata
=
self
::
get_products_last_update
();
//"2017-01-01T00:00:00Z";
$sdata
=
self
::
get_products_last_update
();
//"2017-01-01T00:00:00Z";
$first
=
BillzRest
::
getProducts
(
$sdata
);
$first
=
BillzRest
::
getProducts
(
$sdata
);
...
@@ -574,9 +576,24 @@ class AloVoiceRest
...
@@ -574,9 +576,24 @@ class AloVoiceRest
}
}
}
}
$prdAllCnd
=
count
(
$first
[
"answer"
][
"result"
]);
echo
"Загружено "
.
$prdAllCnd
.
" товаров!"
;
echo
"Импортирования в Тарговый каталог..."
;
foreach
(
$first
[
"answer"
][
"result"
]
as
$prd
){
foreach
(
$first
[
"answer"
][
"result"
]
as
$prd
){
$this
->
bx_process_product
(
$prd
);
$this
->
bx_process_product
(
$prd
);
$newProductsCnt
++
;
$newProductsCnt
++
;
$percStp
=
round
((
$newProductsCnt
/
$prdAllCnd
)
*
100
);
$nowt
=
time
();
$raznt
=
$nowt
-
$tms
[
"0_begin"
];
$remainTime
=
0
;
if
(
$raznt
!=
0
&&
$percStp
!=
0
)
{
$remainTime
=
round
((
$raznt
/
$percStp
)
*
100
);
}
echo
"
\r
Импортировано:
\033
[32m"
.
$percStp
.
"%
\033
[0m [
\033
[36m"
.
$loadedCnt
.
"
\033
[0m/"
.
$totalCnt
.
"] [Прошло: "
.
$raznt
.
" сек.]..."
;
}
}
self
::
set_products_last_update
();
self
::
set_products_last_update
();
...
@@ -620,8 +637,8 @@ class AloVoiceRest
...
@@ -620,8 +637,8 @@ class AloVoiceRest
$arConf
[
"billz_productfields"
]
=
$arAllProperties
;
$arConf
[
"billz_productfields"
]
=
$arAllProperties
;
self
::
save_billzconf
([
"conf"
=>
$arConf
]);
self
::
save_billzconf
([
"conf"
=>
$arConf
]);
$
tms
[
"2_end"
]
=
time
();
$
now
=
time
();
$alltime
=
$
tms
[
"3_end"
]
-
$tms
[
"0_begin"
];
$alltime
=
$
now
-
$tms
[
"0_begin"
];
$return
=
[
"newproducts"
=>
$newProductsCnt
,
"billzprops"
=>
count
(
$arAllProperties
),
"time"
=>
$alltime
.
"sec."
];
//"categories"=>$arSections, "subcats"=>$arSubSections, "trdcats"=>$arTrdSections, "offices"=>$arOffices,
$return
=
[
"newproducts"
=>
$newProductsCnt
,
"billzprops"
=>
count
(
$arAllProperties
),
"time"
=>
$alltime
.
"sec."
];
//"categories"=>$arSections, "subcats"=>$arSubSections, "trdcats"=>$arTrdSections, "offices"=>$arOffices,
ALVC
::
eLog
(
$return
,
"------ AloVoiceRest :: billz_catalog_infos_synch CRON Done!"
);
ALVC
::
eLog
(
$return
,
"------ AloVoiceRest :: billz_catalog_infos_synch CRON Done!"
);
...
...
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