3namespace Bitrix\Sale\TradingPlatform\Ebay\Feed\Data\Sources;
5use \Bitrix\Main\ArgumentNullException;
6use Bitrix\Main\SystemException;
7use \Bitrix\Sale\TradingPlatform\Logger;
8use \Bitrix\Sale\TradingPlatform\Ebay\Ebay;
9use \Bitrix\Sale\TradingPlatform\Ebay\Feed\ResultsTable;
24 if(!isset(
$params[
"REMOTE_PATH_TMPL"]) ||
$params[
"REMOTE_PATH_TMPL"] ==
'')
30 $this->siteId =
$params[
"SITE_ID"];
31 $this->remotePathTmpl =
$params[
"REMOTE_PATH_TMPL"];
32 $this->filter =
$params[
"FILTER"];
38 "RESULT_ID" => $this->
key(),
39 "CONTENT" => $this->resultFileContent
45 return key($this->feedsToCheck);
50 $feedData =
next($this->feedsToCheck);
52 if($feedData !==
false)
58 $this->feedsToCheck =
array();
61 'filter' => $this->filter
64 while($feed =
$res->fetch())
65 $this->feedsToCheck[$feed[
"ID"]] = $feed;
67 $feedData = reset($this->feedsToCheck);
69 if($feedData !==
false)
75 return current($this->feedsToCheck) !==
false;
86 $feedData[
"FEED_TYPE"],
87 $feedData[
"UPLOAD_TIME"]->format(
"M-d-Y")
96 $timeToKeepFiles = 24;
97 $tmpDir = \CTempFile::GetDirectoryName($timeToKeepFiles);
100 $sftp = \Bitrix\Sale\TradingPlatform\Ebay\Helper::getSftp($this->siteId);
110 $files = $sftp->getFilesList($remotePath);
119 if(!mb_strstr($file, $feedData[
"FILENAME"]))
122 if($sftp->downloadFile($remotePath.
"/".$file, $tmpDir.$file))
124 $result = file_get_contents($tmpDir.$file);
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']