OXID eShop CE  4.9.11
 All Classes Files Functions Variables Pages
oxErpCsv Class Reference
+ Inheritance diagram for oxErpCsv:
+ Collaboration diagram for oxErpCsv:

Public Member Functions

 loadSessionData ($sSessionID)
 import ()
 getImportData ($iIdx=null)
 getImportedRowCount ()
 setImportedIds ($key)
- Public Member Functions inherited from oxERPBase
 getStatistics ()
 getSessionID ()
 __call ($sMethod, $aArguments)
 init ($sUserName, $sPassword, $iShopID=1, $iLanguage=0)
 exportType ($sType, $sWhere=null, $iStart=null, $iCount=null, $sSortFieldName=null, $sSortType=null)
 createPluginObject ($sId)

Protected Member Functions

 _beforeExport ($sType)
 _afterExport ($sType)
 _getImportType (&$aData)
 _getImportMode ($aData)
 _modifyData ($aData, $oType)
 _csvTextConvert ($sText, $blMode)
 _beforeImport ()
 _afterImport ()
 _checkIDField ($sID)
 _getInstanceOfType ($sType)
 _importArticle (oxERPType $oType, $aRow)
 _importAccessoire (oxERPType $oType, $aRow)
 _importArticle2Action (oxERPType $oType, $aRow)
 _importArticle2Category (oxERPType $oType, $aRow)
 _importMainArticle2Category (oxERPType $oType, $aRow)
 _importCategory (oxERPType $oType, $aRow)
 _importCrossselling (oxERPType $oType, $aRow)
 _importScaleprice (oxERPType $oType, $aRow)
 _importOrder (oxERPType $oType, $aRow)
 _importOrderArticle (oxERPType $oType, $aRow)
 _importOrderStatus (oxERPType $oType, $aRow)
 _importUser (oxERPType $oType, $aRow)
 _importVendor (oxERPType $oType, $aRow)
 _importArtextends (oxERPType $oType, $aRow)
 _importCountry (oxERPType $oType, $aRow)
 _importArticleStock (oxERPType $oType, $aRow)
- Protected Member Functions inherited from oxERPBase
 _export ($sType, $sWhere, $iStart=null, $iCount=null, $sSortFieldName=null, $sSortType=null)
 _outputMappingArray ($sTable)
 _getKeyID ($oType, $aData)
 _resetIdx ()
 _nextIdx ()
 _checkAccess ($oType, $blWrite, $sOxid=null)
 _importOne ()
 _save (oxERPType &$oType, $aData, $blAllowCustomShopId=false)

Protected Attributes

 $_aSupportedVersions = array("0.1", "1.0", "1.1", "2.0")
 $_aCsv2BaseVersionsMap = array("0.1" => "1", "1.0" => "1", "1.1" => "1.1", "2.0" => "2")
 $_sCurrVersion = ""
 $_aData = array()
 $_iRetryRows = 0
 $_sReturn
 $_sPath
 $_aImportedActions2Article = array()
 $_aImportedObject2Category = array()
 $_aImportedAccessoire2Article = array()
- Protected Attributes inherited from oxERPBase
 $_blInit = false
 $_iLanguage = null
 $_sUserID = null
 $_sSID = null
 $_aImportedIds = array()
 $_iImportedRowCount = 0

Private Member Functions

 getOldOrderArticleFieldList ()
 getOldOrderFielsList ()

Additional Inherited Members

- Static Public Member Functions inherited from oxERPBase
static getRequestedVersion ()
static getUsedDbFieldsVersion ()
static setVersion ($sDbLayerVersion= '')
- Public Attributes inherited from oxERPBase
const ERROR_USER_WRONG = "ERROR: Could not login"
const ERROR_USER_NO_RIGHTS = "Not sufficient rights to perform operation!"
const ERROR_USER_EXISTS = "ERROR: User already exists"
const ERROR_NO_INIT = "Init not executed, Access denied!"
const ERROR_DELETE_NO_EMPTY_CATEGORY = "Only empty category can be deleated"
const ERROR_OBJECT_NOT_EXISTING = "Object does not exist"
const ERROR_ERP_VERSION_NOT_SUPPORTED_BY_SHOP = "ERROR: shop does not support requested ERP version."
const ERROR_SHOP_VERSION_NOT_SUPPORTED_BY_ERP = "ERROR: ERP does not support current shop version."
 $_aStatistics = array()
 $_iIdx = 0
- Static Public Attributes inherited from oxERPBase
static $MODE_IMPORT = "Import"
static $MODE_DELETE = "Delete"
- Static Protected Member Functions inherited from oxERPBase
static _checkShopVersion ()
static _checkRequestedVersion ()
- Static Protected Attributes inherited from oxERPBase
static $_sRequestedVersion = ''
static $_aDbLayer2ShopDbVersions

Detailed Description

Class handeling csv import

Definition at line 6 of file oxerpcsv.php.

Member Function Documentation

oxErpCsv::_afterExport (   $sType)
protected

After import event (abstract function)

Parameters
string$sTypeimport type

Reimplemented from oxERPBase.

Definition at line 93 of file oxerpcsv.php.

oxErpCsv::_afterImport ( )
protected

Performs after import actions

Returns
bool

Reimplemented from oxERPBase.

Definition at line 189 of file oxerpcsv.php.

oxErpCsv::_beforeExport (   $sType)
protected

Before import event (abstract function)

Parameters
string$sTypeimport type

Reimplemented from oxERPBase.

Definition at line 84 of file oxerpcsv.php.

oxErpCsv::_beforeImport ( )
protected

Performs before import actions

Reimplemented from oxERPBase.

Definition at line 173 of file oxerpcsv.php.

oxErpCsv::_checkIDField (   $sID)
protected

Checks if id field is valid

Parameters
string$sIDfield check id

Definition at line 327 of file oxerpcsv.php.

oxErpCsv::_csvTextConvert (   $sText,
  $blMode 
)
protected

parses and replaces special chars

Parameters
string$sTextinput text
bool$blModetrue = Text2CSV, false = CSV2Text
Returns
string

Definition at line 142 of file oxerpcsv.php.

oxErpCsv::_getImportMode (   $aData)
protected

Import mode getter (abstract function)

Parameters
array$aDataimport data

Reimplemented from oxERPBase.

Reimplemented in oxErpGenImport.

Definition at line 111 of file oxerpcsv.php.

oxErpCsv::_getImportType ( $aData)
protected

Import type getter (abstract function)

Parameters
array&$aDataimport data

Reimplemented from oxERPBase.

Reimplemented in oxErpGenImport.

Definition at line 102 of file oxerpcsv.php.

oxErpCsv::_getInstanceOfType (   $sType)
protected

method overridden to allow olf Order and OrderArticle types

Parameters
string$sTypeinstance type
Returns
object

Reimplemented from oxERPBase.

Definition at line 343 of file oxerpcsv.php.

oxErpCsv::_importAccessoire ( oxERPType  $oType,
  $aRow 
)
protected

Imports accessorie. Returns import status

Parameters
object$oTypetype object
object$aRowdb row array
Returns
string $oxid on success, bool FALSE on failure

Definition at line 412 of file oxerpcsv.php.

oxErpCsv::_importArtextends ( oxERPType  $oType,
  $aRow 
)
protected

Imports article extended info. Returns import status (TRUE if success)

Parameters
object$oTypetype object
object$aRowdb row array
Returns
bool

Definition at line 681 of file oxerpcsv.php.

oxErpCsv::_importArticle ( oxERPType  $oType,
  $aRow 
)
protected

Imports article. Returns import status

Parameters
object$oTypetype object
object$aRowdb row array
Returns
string $oxid on success, bool FALSE on failure

Definition at line 383 of file oxerpcsv.php.

oxErpCsv::_importArticle2Action ( oxERPType  $oType,
  $aRow 
)
protected

Imports article 2 action relation. Returns import status

Parameters
object$oTypetype object
object$aRowdb row array
Returns
string $oxid on success, bool FALSE on failure

Definition at line 435 of file oxerpcsv.php.

oxErpCsv::_importArticle2Category ( oxERPType  $oType,
  $aRow 
)
protected

Imports article 2 category relation. Returns import status

Parameters
object$oTypetype object
object$aRowdb row array
Returns
string $oxid on success, bool FALSE on failure

Definition at line 459 of file oxerpcsv.php.

oxErpCsv::_importArticleStock ( oxERPType  $oType,
  $aRow 
)
protected

Imports article stock. Returns import status

Parameters
object$oTypetype object
object$aRowdb row array
Returns
string $oxid on success, bool FALSE on failure

Definition at line 714 of file oxerpcsv.php.

oxErpCsv::_importCategory ( oxERPType  $oType,
  $aRow 
)
protected

Imports category. Returns import status

Parameters
object$oTypetype object
object$aRowdb row array
Returns
string $oxid on success, bool FALSE on failure

Definition at line 509 of file oxerpcsv.php.

oxErpCsv::_importCountry ( oxERPType  $oType,
  $aRow 
)
protected

Imports country object. Returns import status

Parameters
object$oTypetype object
object$aRowdb row array
Returns
string $oxid on success, bool FALSE on failure

Definition at line 699 of file oxerpcsv.php.

oxErpCsv::_importCrossselling ( oxERPType  $oType,
  $aRow 
)
protected

Imports crosselling. Returns import status

Parameters
object$oTypetype object
object$aRowdb row array
Returns
string $oxid on success, bool FALSE on failure

Definition at line 524 of file oxerpcsv.php.

oxErpCsv::_importMainArticle2Category ( oxERPType  $oType,
  $aRow 
)
protected

Imports main article 2 category relation. Returns import status

Parameters
object$oTypetype object
object$aRowdb row array
Returns
string $oxid on success, bool FALSE on failure

Definition at line 482 of file oxerpcsv.php.

oxErpCsv::_importOrder ( oxERPType  $oType,
  $aRow 
)
protected

Imports order. Returns import status

Parameters
object$oTypetype object
object$aRowdb row array
Returns
string $oxid on success, bool FALSE on failure

Definition at line 562 of file oxerpcsv.php.

oxErpCsv::_importOrderArticle ( oxERPType  $oType,
  $aRow 
)
protected

Imports order article. Returns import status

Parameters
object$oTypetype object
object$aRowdb row array
Returns
string $oxid on success, bool FALSE on failure

Definition at line 579 of file oxerpcsv.php.

oxErpCsv::_importOrderStatus ( oxERPType  $oType,
  $aRow 
)
protected

Imports order status. Returns import status (TRUE if success)

Parameters
object$oTypetype object
object$aRowdb row array
Returns
bool

Definition at line 594 of file oxerpcsv.php.

oxErpCsv::_importScaleprice ( oxERPType  $oType,
  $aRow 
)
protected

Imports scale price. Returns import status

Parameters
object$oTypetype object
object$aRowdb row array
Returns
string $oxid on success, bool FALSE on failure

Definition at line 547 of file oxerpcsv.php.

oxErpCsv::_importUser ( oxERPType  $oType,
  $aRow 
)
protected

Imports user. Returns import status

Parameters
object$oTypetype object
object$aRowdb row array
Returns
string $oxid on success, bool FALSE on failure

Definition at line 635 of file oxerpcsv.php.

oxErpCsv::_importVendor ( oxERPType  $oType,
  $aRow 
)
protected

Imports vendor. Returns import status (TRUE if success)

Parameters
object$oTypetype object
object$aRowdb row array
Returns
bool

Definition at line 666 of file oxerpcsv.php.

oxErpCsv::_modifyData (   $aData,
  $oType 
)
protected

Data modifier (abstract function)

Parameters
object$aDatadata to modify
object$oTypetype object

Reimplemented from oxERPBase.

Reimplemented in oxErpGenImport.

Definition at line 121 of file oxerpcsv.php.

oxErpCsv::getImportData (   $iIdx = null)

Returns import data cor current index

Parameters
string$iIdxarray index value
Returns
mixed

Reimplemented from oxERPBase.

Definition at line 220 of file oxerpcsv.php.

oxErpCsv::getImportedRowCount ( )

gets count of imported rows, total, during import

Returns
int $_iImportedRowCount

Reimplemented from oxERPBase.

Definition at line 725 of file oxerpcsv.php.

oxErpCsv::getOldOrderArticleFieldList ( )
private

Returns order article field list due to compatibility reasons, the field list of V0.1

Returns
array

Definition at line 231 of file oxerpcsv.php.

oxErpCsv::getOldOrderFielsList ( )
private

Returns order field list due to compatibility reasons, the field list of V0.1

Returns
array

Definition at line 263 of file oxerpcsv.php.

oxErpCsv::import ( )

Performs import action

Reimplemented from oxERPBase.

Definition at line 159 of file oxerpcsv.php.

oxErpCsv::loadSessionData (   $sSessionID)

Session loader (abstract function)

Parameters
object$sSessionIDsession identifier

Reimplemented from oxERPBase.

Definition at line 130 of file oxerpcsv.php.

oxErpCsv::setImportedIds (   $key)

adds true to $_aImportedIds where key is given

Parameters
mixed$key- given key

Reimplemented from oxERPBase.

Definition at line 734 of file oxerpcsv.php.

Member Data Documentation

oxErpCsv::$_aCsv2BaseVersionsMap = array("0.1" => "1", "1.0" => "1", "1.1" => "1.1", "2.0" => "2")
protected

Definition at line 21 of file oxerpcsv.php.

oxErpCsv::$_aData = array()
protected

Definition at line 35 of file oxerpcsv.php.

oxErpCsv::$_aImportedAccessoire2Article = array()
protected

Definition at line 77 of file oxerpcsv.php.

oxErpCsv::$_aImportedActions2Article = array()
protected

Definition at line 63 of file oxerpcsv.php.

oxErpCsv::$_aImportedObject2Category = array()
protected

Definition at line 70 of file oxerpcsv.php.

oxErpCsv::$_aSupportedVersions = array("0.1", "1.0", "1.1", "2.0")
protected

Definition at line 14 of file oxerpcsv.php.

oxErpCsv::$_iRetryRows = 0
protected

Definition at line 42 of file oxerpcsv.php.

oxErpCsv::$_sCurrVersion = ""
protected

Definition at line 28 of file oxerpcsv.php.

oxErpCsv::$_sPath
protected

Definition at line 56 of file oxerpcsv.php.

oxErpCsv::$_sReturn
protected

Definition at line 49 of file oxerpcsv.php.


The documentation for this class was generated from the following file: