diff --git a/Application/views/blocks/view_item.tpl b/Application/views/blocks/view_item.tpl new file mode 100644 index 0000000..ac54467 --- /dev/null +++ b/Application/views/blocks/view_item.tpl @@ -0,0 +1,25 @@ +[{$smarty.block.parent}] +[{assign var="gtmProduct" value=$oView->getProduct()}] +[{assign var="gtmCategory" value=$gtmProduct->getCategory()}] +[{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}] + + \ No newline at end of file diff --git a/Application/views/ga4/add_to_cart.tpl b/Application/views/ga4/add_to_cart.tpl index 83062ec..b1b13f2 100644 --- a/Application/views/ga4/add_to_cart.tpl +++ b/Application/views/ga4/add_to_cart.tpl @@ -5,6 +5,8 @@ [{capture assign=d3_ga4_add_to_cart}] [{block name="d3_ga4_add_to_basket"}] $("#toBasket").click(function(event) { + + [{*** Debug cases ***}] [{*event.preventDefault();*}] let iArtQuantity = $("#amountToBasket").val(); @@ -28,7 +30,6 @@ 'item_category_3':itemCategories[2] || '', 'item_category_4':itemCategories[3] || '', [{if false}] - [{* ??? what *}] 'item_list_name': 'Search Results', // If associated with a list selection. 'item_list_id': 'SR123', // If associated with a list selection. 'index': 1, // If associated with a list selection. diff --git a/Application/views/ga4/view_item.tpl b/Application/views/ga4/view_item.tpl deleted file mode 100644 index e44d842..0000000 --- a/Application/views/ga4/view_item.tpl +++ /dev/null @@ -1,26 +0,0 @@ -[{strip}] - [{* variable $gtmProduct is passed from parent tempalte *}] - [{assign var="gtmCurrency" value=$oView->getActCurrency()}] - [{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}] - [{assign var="gtmCategory" value=$gtmProduct->getCategory()}] - -[{/strip}] \ No newline at end of file diff --git a/metadata.php b/metadata.php index d1e47e4..7f70821 100755 --- a/metadata.php +++ b/metadata.php @@ -65,6 +65,13 @@ $aModule = [ 'file' => '/Application/views/ga4/add_to_cart.tpl', 'position' => 150 ], + // details + [ + 'template' => 'page/details/inc/productmain.tpl', + 'block' => 'details_productmain_title', + 'file' => '/Application/views/blocks/view_item.tpl', + 'position' => 150 + ], // Lists // view_item_list [