Skip to main content

Hi,

I have a problem where shipping method and total cost gets looped on every item.

Tried using a separate table but it still loop it for every product.

 

This is the code I´m using where its looping shipping and total cost:

{{ item.Name|default:'' }}
Quantity: {{ item.Quantity|floatformat:0}}
{{ item.Price|floatformat:0 }} {{ event|lookup:'$currency_code'|default:'' }}

{{ event.ShippingMethods }} {{ event.extra.TotalShipping|floatformat:0 }} {{ event|lookup:'$currency_code'|default:'' }}

Total: {{ event|lookup:'$value'|floatformat:2 }}  {{ event|lookup:'$currency_code'|default:'' }}

 

Also tried this but it doesnt show product name and are still showing shipping and total cost for every product:

{% for item in event.extra.items %} 
{{ item.Name|default:'' }}
Quantity: {{ item.Quantity|floatformat:0 }}
{{ item.Price|floatformat:0 }} {{ event|lookup:'$currency_code'|default:'' }}
{% endfor %}

{{ event.ShippingMethods }} {{ event.extra.TotalShipping|floatformat:0 }} {{ event|lookup:'$currency_code'|default:'' }}

Total: {{ event|lookup:'$value'|floatformat:2 }}  {{ event|lookup:'$currency_code'|default:'' }}


Hi ​@Andreas Furuskog ! 

Thank you for reaching out to the Community! Were you able to resolve this? 

If you are using a dynamic table and including the shipping and total cost in that same table, it is going to loop for each product that is in a customers order. 

I would suggest including the shipping and total cost variables in a separate static text block so that it doesn’t repeat for each item! 

 

 


Hi ​@Andreas Furuskog ! 

Thank you for reaching out to the Community! Were you able to resolve this? 

If you are using a dynamic table and including the shipping and total cost in that same table, it is going to loop for each product that is in a customers order. 

I would suggest including the shipping and total cost variables in a separate static text block so that it doesn’t repeat for each item! 

 

 

Thank you so much, that was the solution.

Now it looks perfect!