# Admin Order, Email Template - Sort order.lineItems

**URL:** <https://forum.shopware.com/t/admin-order-email-template-sort-order-lineitems/87458>\
**Category:** Shopware 6 (English)\
**Created:** [6. Mai 2021 um 15:23 UTC](https://forum.shopware.com/t/admin-order-email-template-sort-order-lineitems/87458 "2021-05-06T15:23:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vigraman.padmanaban](https://avatars.discourse-cdn.com/v4/letter/v/d78d45/32.png) [@vigraman.padmanaban](https://forum.shopware.com/u/vigraman.padmanaban)\
**Post date:** [6. Mai 2021 um 15:23 UTC](https://forum.shopware.com/t/admin-order-email-template-sort-order-lineitems/87458/1 "2021-05-06T15:23:32Z")

</div>

Hi,

We are using Shopware 6 for our telesale business process. Selling through phone.

When Admin creates the order, a confirmation email is sent to customer.

We use automatic promotion.

In the email template, the ordered items are randomly showed.

Some time the promotion placed as first line item. the email template will look crazy. First discount is applied and then the real time. PFA.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/b/be4ad5e62553225f1097f65d6d3b6b372285d065.png)

I want to avoid this.

So the promotion always should be in the bottom / last item.

I tried using sort, but it doesnot help.  
{% for lineItem in order.lineItems|sort %}

is there any advanced way to do this?

Thanks.

---

<div class="post-metadata">

**Author:** ![essenzenladen](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/essenzenladen/32/11533_2.png) [@essenzenladen](https://forum.shopware.com/u/essenzenladen)\
**Post date:** [18. April 2023 um 09:13 UTC](https://forum.shopware.com/t/admin-order-email-template-sort-order-lineitems/87458/2 "2023-04-18T09:13:29Z")

</div>

I have exactly the same question. Does anyone have an answer?

Thank you 🙂
