OXID eShop CE  6.1.5
OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter Class Reference
+ Inheritance diagram for OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter:
+ Collaboration diagram for OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter:

Public Member Functions

 getEmos ()
 
 getCode ($aParams, $oSmarty)
 

Protected Member Functions

 _getScriptPath ()
 
 _getNewEmosItem ()
 
 _convertToUtf ($sContent)
 
 _prepareProductTitle ($oProduct)
 
 _convProd2EmosItem ($oProduct, $sCatPath="NULL", $iQty=1)
 
 _getEmosPageTitle ($aParams)
 
 _getEmosCl ()
 
 _getEmosCatPath ()
 
 _getBasketProductCatPath ($oArticle)
 
 _getEmosPageId ($sTplName)
 
 _getTplName ()
 

Protected Attributes

 $_sEmosCatPath = null
 
 $_oEmos = null
 
 $_aPagesContent
 
 $_aOrderStepNames
 

Private Member Functions

 _getPagesContent ()
 
 _getOrderStepNames ()
 
 _setControllerInfo ($oEmos, $aParams, $oSmarty)
 
 _setSearchInformation ($oEmos, $oSmarty)
 
 _setBasketInformation ($oEmos, $oUser, $oOrder, $oBasket)
 
 _setUserRegistration ($oEmos, $oUser)
 
 _setBasketActionsInfo ($oEmos)
 

Detailed Description

This class is a reference implementation of a PHP Function to include ECONDA Trackiong into a Shop-System.

The smarty tempaltes should include s tag like [{insert name="oxid_tracker" title=$template_title}]

Member Function Documentation

◆ _convertToUtf()

OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter::_convertToUtf (   $sContent)
protected

Checks whether shop is in utf, if not - iconv string for using with econda json_encode

Deprecated:
since 6.0 (2016-12-07) As the shop installation is utf-8, this method will be removed.
Parameters
string$sContent
Returns
string

◆ _convProd2EmosItem()

OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter::_convProd2EmosItem (   $oProduct,
  $sCatPath = "NULL",
  $iQty = 1 
)
protected

Converts a oxarticle object to an EMOS_Item

Parameters
\OxidEsales\Eshop\Application\Model\Article$oProductarticle to convert
string$sCatPathcategory path
int$iQtybuyable amount
Returns
EMOS_Item

◆ _getBasketProductCatPath()

OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter::_getBasketProductCatPath (   $oArticle)
protected

Builds basket product category path

Parameters
\OxidEsales\Eshop\Application\Model\Article$oArticlearticle to build category id
Returns
string

◆ _getEmosCatPath()

OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter::_getEmosCatPath ( )
protected

Returns current view category path

Returns
string

◆ _getEmosCl()

OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter::_getEmosCl ( )
protected

Returns purpose of this page (current view name)

Returns
string

◆ _getEmosPageId()

OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter::_getEmosPageId (   $sTplName)
protected

generates a unique id for the current page

Parameters
string$sTplNamecurrent view template name
Returns
string

◆ _getEmosPageTitle()

OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter::_getEmosPageTitle (   $aParams)
protected

Returns page title

Parameters
array$aParamsparameters where product info is kept
Returns
string

◆ _getNewEmosItem()

OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter::_getNewEmosItem ( )
protected

Returns emos item object

Returns
EMOS_Item

◆ _getOrderStepNames()

OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter::_getOrderStepNames ( )
private

Returns each order step name in array.

Returns
array

◆ _getPagesContent()

OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter::_getPagesContent ( )
private

Returns page content array.

Returns
array

◆ _getScriptPath()

OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter::_getScriptPath ( )
protected

Returns path to econda script files

Returns
string

◆ _getTplName()

OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter::_getTplName ( )
protected

Returns active view template name

Returns
string

◆ _prepareProductTitle()

OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter::_prepareProductTitle (   $oProduct)
protected

Returns formatted product title

Parameters
\OxidEsales\Eshop\Application\Model\Article$oProductproduct which title must be prepared
Returns
string

◆ _setBasketActionsInfo()

OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter::_setBasketActionsInfo (   $oEmos)
private

Sets basket actions (update and add) information to Emos.

Parameters
\OxidEsales\Eshop\Core\Smarty\Plugin\Emos$oEmos

◆ _setBasketInformation()

OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter::_setBasketInformation (   $oEmos,
  $oUser,
  $oOrder,
  $oBasket 
)
private

Sets basket information to Emos. Uses username (email address) instead of customer number.

Parameters
\OxidEsales\Eshop\Core\Smarty\Plugin\Emos$oEmos
\OxidEsales\Eshop\Application\Model\User$oUser
\OxidEsales\Eshop\Application\Model\Order$oOrder
\OxidEsales\Eshop\Application\Model\Basket$oBasket

◆ _setControllerInfo()

OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter::_setControllerInfo (   $oEmos,
  $aParams,
  $oSmarty 
)
private

Sets controller information in Emos.

Parameters
\OxidEsales\Eshop\Core\Smarty\Plugin\Emos$oEmos
array$aParams
Smarty$oSmarty

◆ _setSearchInformation()

OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter::_setSearchInformation (   $oEmos,
  $oSmarty 
)
private

Sets search page information to Emos. Only tracking first search page, not the following pages. #4018: The emospro.search string is URL-encoded forwarded to econda instead of URL-escaped.

Parameters
\OxidEsales\Eshop\Core\Smarty\Plugin\Emos$oEmos
Smarty$oSmarty

◆ _setUserRegistration()

OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter::_setUserRegistration (   $oEmos,
  $oUser 
)
private

Sets user registration action to Emos.

Parameters
\OxidEsales\Eshop\Core\Smarty\Plugin\Emos$oEmos
\OxidEsales\Eshop\Application\Model\User$oUser

◆ getCode()

OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter::getCode (   $aParams,
  $oSmarty 
)

Builds JS code for current view tracking functionality

Parameters
array$aParamsplugin parameters
smarty$oSmartytemplate engine object
Returns
string

◆ getEmos()

OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter::getEmos ( )

Returns new emos controller object

Returns
\OxidEsales\Eshop\Core\Smarty\Plugin\Emos

Member Data Documentation

◆ $_aOrderStepNames

OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter::$_aOrderStepNames
protected
Initial value:
= [
'basket' => '1_Warenkorb',
'order_process' => '2_Kundendaten',
'user' => '2_Kundendaten',
'user_1' => '2_Kundendaten/OhneReg',
'user_2' => '2_Kundendaten/BereitsKunde',
'user_3' => '2_Kundendaten/NeuesKonto',
'payment' => '3_Zahlungsoptionen',
'order' => '4_Bestelluebersicht',
'thankyou' => '5_Bestaetigung',
]

◆ $_aPagesContent

OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter::$_aPagesContent
protected

◆ $_oEmos

OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter::$_oEmos = null
protected

◆ $_sEmosCatPath

OxidEsales\EshopCommunity\Core\Smarty\Plugin\EmosAdapter::$_sEmosCatPath = null
protected

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