View Issue Details

IDProjectCategoryView StatusLast Update
0003452OXID eShop (all versions)1.09. Integrations: Facebook, Trusted Shops, Shop lupe, Econdapublic2012-12-11 08:47
Reporterdesign3000 
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.5.3 revision 39087 
Target VersionFixed in Version4.5.12 revision 52682 
Summary0003452: Add brands to econda tracking
DescriptionIn econda web analytics one can not analyze articles regarding their brands (vendors). From a marketing point of view this would be quite interesting.

Econda provides the ability to transmit additional data in fields called "variant1" and "variant2", which are not used by the actual adapter. To bring the vendor's name and the manufacturer's name into these fields and thus to the analytics frontend, only two lines need to be added to the function _convProd2EmosItem in /core/smarty/plugins/oxemosadapter.php.

----------------
before
----------------
    protected function _convProd2EmosItem( $oProduct, $sCatPath = "NULL", $iQty = 1 )
    {
        $oItem = $this->_getNewEmosItem();
        $oItem->productId = ( isset( $oProduct->oxarticles__oxartnum->value ) && $oProduct->oxarticles__oxartnum->value ) ? $oProduct->oxarticles__oxartnum->value : $oProduct->getId();
        $oItem->productName = $this->_prepareProductTitle( $oProduct );

        // #810A
        $oCur = $this->getConfig()->getActShopCurrencyObject();
        $oItem->price = $oProduct->getPrice()->getBruttoPrice() * ( 1/$oCur->rate );
        $oItem->productGroup = "{$sCatPath}/{$oProduct->oxarticles__oxtitle->value}";
        $oItem->quantity = $iQty;
        $oItem->variant3 = $oProduct->getId();

        return $oItem;
    }
----------------
after
----------------
    protected function _convProd2EmosItem( $oProduct, $sCatPath = "NULL", $iQty = 1 )
    {
        $oItem = $this->_getNewEmosItem();
        $oItem->productId = ( isset( $oProduct->oxarticles__oxartnum->value ) && $oProduct->oxarticles__oxartnum->value ) ? $oProduct->oxarticles__oxartnum->value : $oProduct->getId();
        $oItem->productName = $this->_prepareProductTitle( $oProduct );

        // #810A
        $oCur = $this->getConfig()->getActShopCurrencyObject();
        $oItem->price = $oProduct->getPrice()->getBruttoPrice() * ( 1/$oCur->rate );
        $oItem->productGroup = "{$sCatPath}/{$oProduct->oxarticles__oxtitle->value}";
        $oItem->quantity = $iQty;
        $oItem->variant1 = $oProduct->getVendor() ? $oProduct->getVendor()->getTitle() : "NULL";
        $oItem->variant2 = $oProduct->getManufacturer() ? $oProduct->getManufacturer()->getTitle() : "NULL";
        $oItem->variant3 = $oProduct->getId();

        return $oItem;
    }


The resulting output e. g. on a details page is the following:
----------------
before
----------------
emospro.ec_Event = [["view","006-3558783","Tassenutensilo Lilli 2er-Set solid himbeer",3.95,"Essen & Trinken\/K\u00fcchenhelfer\/Teesiebe & Tee-Eier\/Tassenutensilo Lilli 2er-Set solid himbeer",1,"NULL","NULL","d144dabe432ede856.46704148"]];

----------------
after
----------------
emospro.ec_Event = [["view","006-3558783","Tassenutensilo Lilli 2er-Set solid himbeer",3.95,"Essen & Trinken\/K\u00fcchenhelfer\/Teesiebe & Tee-Eier\/Tassenutensilo Lilli 2er-Set solid himbeer",1,"Koziol","Koziol","d144dabe432ede856.46704148"]];
TagsEconda
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Activities

edvardas_gineika

2012-06-26 08:15

reporter   ~0006983

Added variant1 and variant2 filled with vendor and manufacturer