[Changed] move item_variants to own event-parameter section

This commit is contained in:
2025-06-15 16:48:29 +02:00
parent adbb7fd2c0
commit 73aeb4c6c3

View File

@ -29,9 +29,13 @@
{% endif %} {% endif %}
{% set d3PriceObject = gtmProduct.getPrice() %} {% set d3PriceObject = gtmProduct.getPrice() %}
'price': {{ d3PriceObject.getPrice() }} 'price': {{ d3PriceObject.getPrice() }}
}{% if d3ViewObject.d3GetModuleConfigParam('_blViewItemAddVariants') %} }
]
{% if d3ViewObject.d3GetModuleConfigParam('_blViewItemAddVariants') %}
,'item_variants':
[
{% for gtmProduct.getVariants() in oVariant %} {% for gtmProduct.getVariants() in oVariant %}
, { {
'item_name': '{{ oVariant.getRawFieldData("oxtitle") }}', 'item_name': '{{ oVariant.getRawFieldData("oxtitle") }}',
'item_id': '{{ oVariant.getFieldData("oxartnum") }}', 'item_id': '{{ oVariant.getFieldData("oxartnum") }}',
'item_brand': '{% if gtmManufacturer %}{{ gtmManufacturer.getFieldData('oxtitle')|raw }}{% endif %}', 'item_brand': '{% if gtmManufacturer %}{{ gtmManufacturer.getFieldData('oxtitle')|raw }}{% endif %}',
@ -47,8 +51,8 @@
'price': {{ d3PriceObject.getPrice() }} 'price': {{ d3PriceObject.getPrice() }}
} }
{% endfor %} {% endfor %}
{% endif %}
] ]
{% endif %}
}{% if oViewConf.isDebugModeOn() %}, }{% if oViewConf.isDebugModeOn() %},
'debug_mode': 'true' 'debug_mode': 'true'
{% endif %} {% endif %}