/** * Send catalog to PB SFTP * * @return void */ public function doActionExport() { $isDifferential = !empty(\XLite\Core\Request::getInstance()->type) && \XLite\Core\Request::getInstance()->type === 'diff'; \XLite\Logic\Export\Generator::run(\XLite\Logic\Export\Generator::getPBExportOptions(array('differential' => $isDifferential))); }
/** * Run catalog submission * * @param boolean $diff Perform differential extraction (default: false, full extraction) * * @return void */ protected function runSubmit($diff = false) { \XLite\Logger::logCustom("PitneyBowes", 'Submitting catalog (diff: ' . var_export($diff, true) . ')', false); \XLite\Logic\Export\Generator::run(\XLite\Logic\Export\Generator::getPBExportOptions(array('differential' => $diff))); $running = \XLite\Logic\Export\Generator::runHeadless(); //submit to pb if (!$running) { $config = $this->getConfiguration(); $processor = new PitneyBowes\Logic\FileExchange\Processor($config); $generator = $this->getGenerator(); if ($generator) { $processor->submitCatalog($generator->getCatalogFiles(), $generator->getOptions()->differential); } } }