source/Core/Smarty/Plugin/EmosAdapter.php
protected function _convProd2EmosItem($oProduct, $sCatPath = "NULL", $iQty = 1)
    {
        $oItem = $this->_getNewEmosItem();

        $sProductId = (isset($oProduct->oxarticles__oxartnum->value) && $oProduct->oxarticles__oxartnum->value) ? $oProduct->oxarticles__oxartnum->value : $oProduct->getId();
        $oItem->productId = $sProductId;
        $oItem->productName = $this->_prepareProductTitle($oProduct);

        // #810A
        $oCur = \OxidEsales\Eshop\Core\Registry::getConfig()->getActShopCurrencyObject();
        $oItem->price = $oProduct->getPrice()->getBruttoPrice() * (1 / $oCur->rate);
        $oItem->productGroup = "{$sCatPath}/{$oProduct->oxarticles__oxtitle->value}";
        $oItem->quantity = $iQty;
        // #3452: Add brands to econda tracking
        $oItem->variant1 = $oProduct->getVendor() ? $oProduct->getVendor()->getTitle() : "NULL";
        $oItem->variant2 = $oProduct->getManufacturer() ? $oProduct->getManufacturer()->getTitle() : "NULL";
        $oItem->variant3 = $oProduct->getId();

        return $oItem;
    }
protected function _convProd2EmosItem($oProduct, $sCatPath = "NULL", $iQty = 1)
    {
        $oItem = $this->_getNewEmosItem();

        $sProductId = (isset($oProduct->oxarticles__oxartnum->value) && $oProduct->oxarticles__oxartnum->value) ? $oProduct->oxarticles__oxartnum->value : $oProduct->getId();
        $oItem->productId = $sProductId;
        $oItem->productName = $this->_prepareProductTitle($oProduct);

        // #810A
        $oCur = \OxidEsales\Eshop\Core\Registry::getConfig()->getActShopCurrencyObject();
        $oItem->price = $oProduct->getPrice()->getBruttoPrice() * (1 / $oCur->rate);
        $oItem->productGroup = "{$sCatPath}/{$oProduct->oxarticles__oxtitle->value}";
        $oItem->quantity = $iQty;
        // #3452: Add brands to econda tracking
        $oItem->variant1 = $oProduct->getVendor() ? $oProduct->getVendor()->getTitle() : "NULL";
        $oItem->variant2 = $oProduct->getManufacturer() ? $oProduct->getManufacturer()->getTitle() : "NULL";
        $oItem->variant3 = $oProduct->getId();

        return $oItem;
    }
protected function _convProd2EmosItem ( $ oProduct , $ sCatPath = "NULL" , $ iQty = 1 ) { $ oItem = $ this -> _getNewEmosItem ( ) ; $ sProductId = ( isset ( $ oProduct -> oxarticles__oxartnum -> value ) && $ oProduct -> oxarticles__oxartnum -> value ) ? $ oProduct -> oxarticles__oxartnum -> value : $ oProduct -> getId ( ) ; $ oItem -> productId = $ sProductId ; $ oItem -> productName = $ this -> _prepareProductTitle ( $ oProduct ) ; // #810A $ oCur = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getActShopCurrencyObject ( ) ; $ oItem -> price = $ oProduct -> getPrice ( ) -> getBruttoPrice ( ) * ( 1 / $ oCur -> rate ) ; $ oItem -> productGroup = "{$sCatPath}/{$oProduct->oxarticles__oxtitle->value}" ; $ oItem -> quantity = $ iQty ; // #3452: Add brands to econda tracking $ oItem -> variant1 = $ oProduct -> getVendor ( ) ? $ oProduct -> getVendor ( ) -> getTitle ( ) : "NULL" ; $ oItem -> variant2 = $ oProduct -> getManufacturer ( ) ? $ oProduct -> getManufacturer ( ) -> getTitle ( ) : "NULL" ; $ oItem -> variant3 = $ oProduct -> getId ( ) ; return $ oItem ; }
Converts a oxarticle object to an EMOS_Item

@param \OxidEsales\Eshop\Application\Model\Article $oProduct article to convert
@param string $sCatPath category path
@param int $iQty buyable amount

@return EMOS_Item
Converts a oxarticle object to an EMOS_Item