1
0
Fork 0
mirror of synced 2025-04-09 12:02:04 +00:00

archived goods

This commit is contained in:
Sergey 2017-09-13 18:08:22 +03:00
parent 516b098e05
commit 72ac6c1829

View file

@ -101,8 +101,11 @@ class MoySkladICMLParser
}
$icml = $this->ICMLCreate($categories, $assortiment);
$icml->asXML($this->getFilePath());
if (count($categories) > 0 && count($assortiment) > 0) {
$icml->asXML($this->getFilePath());
}
// $icml->asXML($this->getFilePath());
}
@ -206,7 +209,7 @@ class MoySkladICMLParser
break;
}
}
$categories = array();
return $categories;
}
@ -221,13 +224,19 @@ class MoySkladICMLParser
$offset = 0;
$end = null;
$url = self::ASSORT_LIST_URL.'?expand='.self::ASSORTIMENT_EXPAND.'&limit='.self::LIMIT;
$ignoreNoCategoryOffers = isset($this->options['ignoreNoCategoryOffers']) && $this->options['ignoreNoCategoryOffers'];
$ignoreCategories = $this->getIgnoreProductGroupsInfo();
if ($this->options['archivedGoods'] == true) {
$url .= '&archived=All';
}
while (true) {
$response = $this->requestJson(self::ASSORT_LIST_URL.'?expand='.self::ASSORTIMENT_EXPAND.'&limit='.self::LIMIT.'&offset='.$offset);
$response = $this->requestJson($url.'&offset='.$offset);
if ($response && $response['rows']) {
foreach ($response['rows'] as $assortiment) {