We ship from a single location but have multiple warehouse locations. Using an order routing app we are able to split and tag the orders. Using the tags I set up a flow to send an internal email to the assigned stores based on the Order Tags. The trouble I’m having is when I try to add the assignedLocation variable, it’s duplicating products.
This is what I have:
{% for fulfillmentOrders_item in order.fulfillmentOrders %}
{% for lineItems_item in fulfillmentOrders_item.order.lineItems %}
{{lineItems_item.vendor}} - {{lineItems_item.name}} - SKU: {{lineItems_item.sku}} (Qty:
{{lineItems_item.quantity}}
{{fulfillmentOrders_item.assignedLocation.name}}
{% endfor %}
{% endfor %}
But the output for an order with only line items is:
Vendor1 - Product1 - BLACK / S - SKU: ### - x 1 at Location1
Vendor2 - Product2 - YELLOW / XS - SKU: ### - x 1 at Location1
Vendor1 - Product1 - BLACK / S - SKU: ### - x 1 at Location2
Vendor2 - Product2 - YELLOW / XS - SKU: ### - x 1 at Location2
What do I need to do so the location is associated to the product and not being amended? Any help would be greatly appreciated! Thanks!