Esempio n. 1
0
 /**
  * Represents the "get_media_csv" action.
  *
  * @throws ShopgateLibraryException
  * @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_media_csv
  */
 protected function getMediaCsv()
 {
     if (isset($this->params['limit']) && isset($this->params['offset'])) {
         $this->plugin->setExportLimit((int) $this->params['limit']);
         $this->plugin->setExportOffset((int) $this->params['offset']);
         $this->plugin->setSplittedExport(true);
     }
     // generate / update items csv file if requested
     $this->plugin->startGetMediaCsv();
     if (empty($this->response)) {
         $this->response = new ShopgatePluginApiResponseTextCsvExport($this->trace_id);
     }
     $this->responseData = $this->config->getMediaCsvPath();
 }
Esempio n. 2
0
 /**
  * Takes care of buffer and file handlers and calls ShopgatePlugin::createItemsCsv().
  *
  * @throws ShopgateLibraryException
  */
 public final function startGetMediaCsv()
 {
     $this->buffer->setFile($this->config->getMediaCsvPath());
     $this->createMediaCsv();
     $this->buffer->finish();
 }