Skip to content

Commit

Permalink
Add block around plugin element
Browse files Browse the repository at this point in the history
  • Loading branch information
Rune Laenen committed Jul 29, 2024
1 parent 7062550 commit f93cf34
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Resources/views/storefront/component/cart-insight.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
{% set canSendCartInsight = hasCorrectConfig and canSendToCurrentUser %}

{% if canSendCartInsight %}

{% set payloadData = {
customer_email: context.customer.email | default(''),
program_id: config('DotdigitalForShopware.config.acProgramId'),
Expand Down Expand Up @@ -51,6 +50,7 @@
image_url: lineItem.cover.url,
product_url: seoUrl('frontend.detail.page', { productId: lineItem.productId ?? lineItem.referencedId })
} %}

{% set processedLineItems = processedLineItems|merge([productData]) %}
{% endif %}
{% endfor %}
Expand Down Expand Up @@ -82,6 +82,7 @@
data: payloadData
} %}

<template data-cart-insight-handler-plugin data-cart-insight-handler-plugin-options='{{ cartInsightHandlerPluginOptions|json_encode }}'></template>

{% block cart_insight_handler_plugin_element %}
<template data-cart-insight-handler-plugin data-cart-insight-handler-plugin-options='{{ cartInsightHandlerPluginOptions|json_encode }}'></template>
{% endblock %}
{% endif %}

0 comments on commit f93cf34

Please sign in to comment.