archived goods
This commit is contained in:
parent
516b098e05
commit
72ac6c1829
1 changed files with 13 additions and 4 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue