fix bug that would display cat path

This commit is contained in:
MaxBUhe 2023-01-17 09:57:37 +01:00
parent a5378ec70e
commit 633c1336a8

View File

@ -2,12 +2,6 @@
[{assign var="breadCrumb" value=''}] [{assign var="breadCrumb" value=''}]
[{foreach from=$oView->getBreadCrumb() item=sCrum}]
[{if $sCrum.title }]
[{$breadCrumb|cat:$sCrum.title|cat:" > "}]
[{/if}]
[{/foreach}]
[{if $gtmProducts|@count}] [{if $gtmProducts|@count}]
[{strip}] [{strip}]
<script> <script>
@ -18,7 +12,7 @@
'event_name': 'view_item_list', 'event_name': 'view_item_list',
'ecommerce': { 'ecommerce': {
'item_list_id': '[{$oView->getCategoryId()}]', 'item_list_id': '[{$oView->getCategoryId()}]',
'item_list_name': '[{$breadCrumb}]', 'item_list_name': '[{foreach from=$oView->getBreadCrumb() item=sCrum}][{if $sCrum.title }][{$breadCrumb|cat:$sCrum.title|cat:" > "}][{/if}][{/foreach}]',
'items': [ 'items': [
[{foreach from=$gtmProducts name="gtmProducts" item="gtmProduct"}] [{foreach from=$gtmProducts name="gtmProducts" item="gtmProduct"}]
[{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}] [{assign var="gtmManufacturer" value=$gtmProduct->getManufacturer()}]