From 98533cf7f71bbbdd619779903bfc4b13f1da92e2 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Wed, 22 Feb 2023 13:46:27 +0100 Subject: [PATCH] add special price formatting --- Application/views/blocks/checkout_s1.tpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Application/views/blocks/checkout_s1.tpl b/Application/views/blocks/checkout_s1.tpl index 79bfee6..498b7dc 100644 --- a/Application/views/blocks/checkout_s1.tpl +++ b/Application/views/blocks/checkout_s1.tpl @@ -4,6 +4,8 @@ [{assign var='gtmCartArticles' value=$oView->getBasketArticles()}] [{strip}][{capture assign=d3_ga4_view_cart}] + let iPrice = "[{oxprice price=$oxcmp_basket->getPrice()}]"; + dataLayer.push({"event": null, "eventLabel": null, "ecommerce": null}); /* Clear the previous ecommerce object. */ dataLayer.push({ 'event': 'view_cart', @@ -11,7 +13,7 @@ 'ecommerce': { 'actionField': "step: 1", 'currency': "[{$currency->name}]", - 'value': [{oxprice price=$oxcmp_basket->getPrice()}], + 'value': iPrice.replace("€", ""), 'items': [ [{foreach from=$oxcmp_basket->getContents() item=basketitem name=gtmCartContents key=basketindex}] [{assign var='_price' value=$basketitem->getUnitPrice()}]