OXID eShop CE  4.9.9
 All Classes Files Functions Variables Pages
genexport_do.php
Go to the documentation of this file.
1 <?php
2 
7 {
8 
14  public $sClassDo = "genExport_do";
15 
21  public $sClassMain = "genExport_main";
22 
28  public $sExportFileName = "genexport";
29 
35  protected $_sThisTemplate = "dynbase_do.tpl";
36 
44  public function nextTick($iCnt)
45  {
46  $iExportedItems = $iCnt;
47  $blContinue = false;
48  if ($oArticle = $this->getOneArticle($iCnt, $blContinue)) {
50  $oSmarty = oxRegistry::get("oxUtilsView")->getSmarty();
51  $oSmarty->assign("sCustomHeader", oxRegistry::getSession()->getVariable("sExportCustomHeader"));
52  $oSmarty->assign_by_ref("linenr", $iCnt);
53  $oSmarty->assign_by_ref("article", $oArticle);
54  $oSmarty->assign("spr", $myConfig->getConfigParam('sCSVSign'));
55  $oSmarty->assign("encl", $myConfig->getConfigParam('sGiCsvFieldEncloser'));
56  $this->write($oSmarty->fetch("genexport.tpl", $this->getViewId()));
57 
58  return ++$iExportedItems;
59  }
60 
61  return $blContinue;
62  }
63 
69  public function write($sLine)
70  {
71  $sLine = $this->removeSID($sLine);
72 
73  $sLine = str_replace(array("\r\n", "\n"), "", $sLine);
74  $sLine = str_replace("<br>", "\n", $sLine);
75 
76  fwrite($this->fpFile, $sLine . "\r\n");
77  }
78 }