# Automatischer Mailversand bei geringem Lagerbestand

**URL:** <https://forum.shopware.com/t/automatischer-mailversand-bei-geringem-lagerbestand/100374>\
**Category:** Shopware 6 (German)\
**Created:** [5. Juli 2023 um 05:09 UTC](https://forum.shopware.com/t/automatischer-mailversand-bei-geringem-lagerbestand/100374 "2023-07-05T05:09:36Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![ledaquaristik](https://avatars.discourse-cdn.com/v4/letter/l/bbce88/32.png) [@ledaquaristik](https://forum.shopware.com/u/ledaquaristik)\
**Post date:** [29. Juni 2024 um 04:18 UTC](https://forum.shopware.com/t/automatischer-mailversand-bei-geringem-lagerbestand/100374/22 "2024-06-29T04:18:20Z")

</div>

Hallo Alex,

Vielen Dank das hilft schon deutlich weiter.

Hier noch eine Anpassung, so dass man auch den Lagerbestand in der Mail sieht.

```auto
{% for lineItem in order.lineItems %}
    {% if lineItem.payload.productNumber is defined %}
        &bull; {{ lineItem.payload.productNumber|u.wordwrap(80) }}: {{ lineItem.label|u.wordwrap(80) }}
        {% if lineItem.payload.stock is defined %}
            (Lagerbestand: {{ lineItem.payload.stock }})
        {% else %}
            (Lagerbestand: nicht verfügbar)
        {% endif %}
        <br>
    {% endif %}      
{% endfor %}

```

oder eben nur die Artikel die auch Lagerbestand \<1 haben:

```auto
{% for lineItem in order.lineItems %}
    {% if lineItem.payload.productNumber is defined and lineItem.payload.stock is defined and lineItem.payload.stock < 1 %}
        &bull; {{ lineItem.payload.productNumber|u.wordwrap(80) }}: {{ lineItem.label|u.wordwrap(80) }}
        (Lagerbestand: {{ lineItem.payload.stock }})<br>
    {% endif %}
{% endfor %}

```

So hat man direkt den Artikel mit niedrigem Bestand identifiziert, falls die Bestellung mehrere Artikel umfasst.

VG  
Dennis

---

<div class="post-metadata">

**Author:** ![UX4U](https://avatars.discourse-cdn.com/v4/letter/u/5daacb/32.png) [@UX4U](https://forum.shopware.com/u/UX4U)\
**Post date:** [29. Juni 2024 um 10:17 UTC](https://forum.shopware.com/t/automatischer-mailversand-bei-geringem-lagerbestand/100374/23 "2024-06-29T10:17:46Z")

</div>

@ledaquaristik damit sieht man den Lagerbestand (verfügbarer Lagerbestand + gekaufte, aber noch nicht bezahlte Ware), aber leider nicht den verfügbaren Lagerbestand.

[Vorherige Seite](https://forum.shopware.com/t/automatischer-mailversand-bei-geringem-lagerbestand/100374.md?page=1)
