From 1f60e936d90b62341e4ab3d29435d30a68b77d91 Mon Sep 17 00:00:00 2001 From: DanielSeifert Date: Thu, 24 Jul 2014 08:48:09 +0000 Subject: [PATCH] bugfix: article titles were escaped --- .../views/tpl/widget/d3_googleanalytics.tpl | 14 +++++++------- .../tpl/widget/inc/d3ga_universal_ecommerce.tpl | 8 ++++---- setup+doku/changelog.txt | 3 ++- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/d3_googleanalytics.tpl b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/d3_googleanalytics.tpl index cd3da7c..c30c4e7 100644 --- a/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/d3_googleanalytics.tpl +++ b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/d3_googleanalytics.tpl @@ -138,7 +138,7 @@ _gaq.push(['_addTrans', '[{$order->oxorder__oxordernr->value}]', [{* // order ID - required *}] - '[{$oxcmp_shop->oxshops__oxname->value}]', [{* // affiliation or store name *}] + '[{$oxcmp_shop->oxshops__oxname->value|escape:"quotes"}]', [{* // affiliation or store name *}] [{if $oD3GASettings->getValue('blD3GAUseNetto')}] '[{math equation="s / r" s=$order->getOrderNetSum() r=$currate format="%.2f"}]', [{* // total - required - has to be gross sum *}] [{else}] @@ -146,17 +146,17 @@ [{/if}] '[{math equation="s - r" s=$order->getTotalOrderSum() r=$order->getOrderNetSum() format="%.2f"}]', [{* // tax *}] '[{math equation="s / r" s=$order->oxorder__oxdelcost->value r=$currate format="%.2f"}]', [{* // shipping *}] - '[{$order->oxorder__oxbillcity->value}]', [{* // city *}] - '[{$order->oxorder__oxbillstate->value}]', [{* // state or province *}] - '[{$order->oxorder__oxbillcountry->value}]' [{* // country *}] + '[{$order->oxorder__oxbillcity->value|escape:"quotes"}]', [{* // city *}] + '[{$order->oxorder__oxbillstate->value|escape:"quotes"}]', [{* // state or province *}] + '[{$order->oxorder__oxbillcountry->value|escape:"quotes"}]' [{* // country *}] ]); [{foreach from=$order->getOrderArticles() item=oOrderArticle}] _gaq.push(['_addItem', '[{$order->oxorder__oxordernr->value}]', [{* // order ID - required *}] - '[{$oOrderArticle->oxorderarticles__oxartnum->value}]', [{* // SKU/code *}] - '[{$oOrderArticle->oxorderarticles__oxtitle->value}]', [{* // product name *}] - '[{$oOrderArticle->oxorderarticles__d3_galocator->value}]', [{* // category or variation *}] + '[{$oOrderArticle->oxorderarticles__oxartnum->value|escape:"quotes"}]', [{* // SKU/code *}] + '[{$oOrderArticle->oxorderarticles__oxtitle->value|escape:"quotes"}]', [{* // product name *}] + '[{$oOrderArticle->oxorderarticles__d3_galocator->value|escape:"quotes"}]', [{* // category or variation *}] [{*'[{$oOrderArticle->oxorderarticles__oxselvariant->value}]', [{* // category or variation *}] [{if $oD3GASettings->getValue('blD3GAUseNetto')}] [{assign var="oPrice" value=$oOrderArticle->getPrice()}] diff --git a/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_ecommerce.tpl b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_ecommerce.tpl index 35e3b82..b342b35 100644 --- a/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_ecommerce.tpl +++ b/changed_full/470-/modules/d3/d3_googleanalytics/views/tpl/widget/inc/d3ga_universal_ecommerce.tpl @@ -14,7 +14,7 @@ ga('ecommerce:addTransaction', { 'id': '[{$order->oxorder__oxordernr->value}]', [{* Transaction ID. Required *}] - 'affiliation': '[{$oxcmp_shop->oxshops__oxname->value}]', [{* Affiliation or store name *}] + 'affiliation': '[{$oxcmp_shop->oxshops__oxname->value|escape:"quotes"}]', [{* Affiliation or store name *}] 'revenue': '[{$sTotal}]', [{* Gesamtwert *}] 'shipping': '[{$sShipping}]', [{* Versand *}] 'tax': '[{$sTax}]' [{* Steuer *}] @@ -31,9 +31,9 @@ ga('ecommerce:addItem', { 'id': '[{$order->oxorder__oxordernr->value}]', [{* Transaktions-ID *}] - 'name': '[{$oOrderArticle->oxorderarticles__oxtitle->value}]', [{* Produktname *}] - 'sku': '[{$oOrderArticle->oxorderarticles__oxartnum->value}]', [{* SKU/Code *}] - 'category': '[{$oOrderArticle->oxorderarticles__d3_galocator->value}]', [{* Kategorie oder Ausführung *}] + 'name': '[{$oOrderArticle->oxorderarticles__oxtitle->value|escape:"quotes"}]', [{* Produktname *}] + 'sku': '[{$oOrderArticle->oxorderarticles__oxartnum->value|escape:"quotes"}]', [{* SKU/Code *}] + 'category': '[{$oOrderArticle->oxorderarticles__d3_galocator->value|escape:"quotes"}]', [{* Kategorie oder Ausführung *}] [{*'category': '[{$oOrderArticle->oxorderarticles__oxselvariant->value}]', [{* Kategorie oder Ausführung *}] 'price': '[{$sPrice}]', [{* Preis pro Einheit *}] 'quantity': '[{$oOrderArticle->oxorderarticles__oxamount->value}]' [{* Menge *}] diff --git a/setup+doku/changelog.txt b/setup+doku/changelog.txt index f9d5411..8a48ea3 100644 --- a/setup+doku/changelog.txt +++ b/setup+doku/changelog.txt @@ -1,5 +1,6 @@ -=> ?? +=> 3.2.0.0 - Tracking für gekaufte Artikel enthält Daten zur Kategorie / Seite, aus der die Artikel zuerst in den Warenkorb gelegt wurden +- Bugfix: Artikeltitel werden escaped, sofern Quotes enthalten sind => 3.1.0.2 - Bugfix: deaktiviertes Modul kann benötigtes Objekt nicht laden