3namespace Bitrix\Sale\TradingPlatform\Vk\Feed\Data\Sources;
5use Bitrix\Catalog\Ebay\ExportOfferCreator;
7use Bitrix\Main\SystemException;
8use Bitrix\Main\ArgumentNullException;
9use Bitrix\Sale\TradingPlatform\Vk;
35 if (!$this->vk->isActive())
46 if (!Loader::includeModule(
'catalog'))
47 throw new SystemException(
"Can't include module \"Catalog\"! " . __METHOD__);
51 $sectionsToExport = $sectionsList->getSectionsToProductExport();
53 if(!empty($sectionsToExport))
55 $logger->addLog(
'Sections to export', $sectionsToExport);
57 $iblockIds = $sectionsList->getMappedIblocks();
60 if (empty($sectionsToExport))
62 $logger->addError(
'EMPTY_SECTIONS_LIST');
68 $exportOfferParams =
array(
70 "PRODUCT_GROUPS" => $sectionsToExport[
$iblockId],
71 "INCLUDE_SUBSECTION" =>
false
74 if (isset($this->startPosition[
$iblockId]))
76 $exportOfferParams[
"START_POSITION"] = $this->startPosition[
$iblockId];
77 $this->startFeed =
count($this->feeds);
81 if($this->vk->getAvailableFlag($this->exportId))
82 $feed->setOnlyAvailableFlag(
true);
84 $this->feeds[] = $feed;
92 if ($startPosition <>
'')
96 if (Loader::includeModule(
"catalog") && Loader::includeModule(
"iblock"))
111 $current = $this->feeds[$this->currentFeed]->current();
121 return $this->currentFeed .
"_" . $this->feeds[$this->currentFeed]->key();
129 $this->feeds[$this->currentFeed]->next();
132 if (!$this->
valid() && $this->currentFeed <
count($this->feeds) - 1)
134 $this->currentFeed++;
144 $this->currentFeed = $this->startFeed;
146 foreach ($this->feeds as $feed)
156 return $this->feeds[$this->currentFeed]->valid();
static getOfferObject(array $offerParams)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"