Skip to content

Commit

Permalink
Add the product number to order tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
Radomir98 committed Aug 19, 2024
1 parent 3afb11e commit b6553c8
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

{% set order = page.order %}
{% set customerDataToNosto = context.context.extensions.nostoConfig.customerDataToNosto %}
{% set productIdentifier = context.context.extensions.nostoConfig.productIdentifier %}

{% if order %}
<div class="nosto_purchase_order" style="display:none">
Expand All @@ -23,7 +24,13 @@
{% for lineItem in order.lineItems %}
{% if lineItem.type == 'product' %}
<div class="line_item">
<span class="product_id">{{ lineItem.referencedId }}</span>
<span class="product_id">
{% if productIdentifier == 'product-number' %}
{{ lineItem.payload.productNumber }}
{% else %}
{{ lineItem.referencedId }}
{% endif %}
</span>
<span class="quantity">{{ lineItem.quantity }}</span>
<span class="name">{{ lineItem.label }}</span>
<span class="unit_price">{{ lineItem.unitPrice }}</span>
Expand Down

0 comments on commit b6553c8

Please sign in to comment.