Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Adjust MJML template to include schema_markup

Pacu2f1181da88ba2
diff --git a/saleor/order/emails.py b/saleor/order/emails.py
index d59195c39b..06518b5864 100644
--- a/saleor/order/emails.py
+++ b/saleor/order/emails.py
@@ -43,7 +43,7 @@ def collect_data_for_email(order_pk, template):
def send_order_confirmation(order_pk):
order = Order.objects.get(pk=order_pk)
email_markup = get_order_confirmation_markup(order)
- context = {'order': order, 'email_markup': email_markup}
+ context = {'order': order, 'schema_markup': email_markup}
email_data = collect_data_for_email(order_pk, CONFIRM_ORDER_TEMPLATE)
email_data.update({'context': context})
_send_confirmation(**email_data)
diff --git a/templates/templated_email/source/order/confirm_order.email b/templates/templated_email/source/order/confirm_order.email
index 92445130a6..449844c66f 100644
--- a/templates/templated_email/source/order/confirm_order.email
+++ b/templates/templated_email/source/order/confirm_order.email
@@ -35,5 +35,4 @@ Sincerely,
{% block html %}
{% include 'templated_email/compiled/confirm_order.html' %}
-<script type="application/ld+json">{{ email_markup|safe }}</script>
{% endblock %}
diff --git a/templates/templated_email/source/shared/footer.mjml b/templates/templated_email/source/shared/footer.mjml
index 5baf40405d..3b67202737 100644
--- a/templates/templated_email/source/shared/footer.mjml
+++ b/templates/templated_email/source/shared/footer.mjml
@@ -16,3 +16,10 @@
</mj-text>
</mj-column>
</mj-section>
+<mj-section css-class="no-display">
+ <mj-column>
+ <mj-text>
+ <script type="application/ld+json">{{ schema_markup|safe }}</script>
+ </mj-text>
+ </mj-column>
+</mj-section>