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