# Fehlendes Attribut \[Verfügbarkeitsdatum)

**URL:** https://forum.shopware.com/t/fehlendes-attribut-verfuegbarkeitsdatum/100072
**Category:** Shopware 6 (German)
**Created:** [13. Juni 2023 um 10:36 UTC](https://forum.shopware.com/t/fehlendes-attribut-verfuegbarkeitsdatum/100072 "2023-06-13T10:36:08Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![E-VS](https://avatars.discourse-cdn.com/v4/letter/e/3e96dc/32.png) [@E-VS](https://forum.shopware.com/u/E-VS)
#### Post date: [13. Juni 2023 um 10:36 UTC](https://forum.shopware.com/t/fehlendes-attribut-verfuegbarkeitsdatum/100072/1 "2023-06-13T10:36:09Z")

</div>

Bei mir kommt im Merchant die Fehlermeldung.  
Fehlendes Attribut [Verfügbarkeitsdatum)

Dabei steht bei den Produkten z.B. Lieferzeit auf Anfrage oder Lieferzeit 14 Tage

Wie kann ich das Problem lösen?

---

<div class="post-metadata">

### Author: ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)
#### Post date: [13. Juni 2023 um 11:20 UTC](https://forum.shopware.com/t/fehlendes-attribut-verfuegbarkeitsdatum/100072/2 "2023-06-13T11:20:26Z")

</div>

Indem du für Produkte, die preorder Status haben per if Abfrage ein entsprechenden availability\_date angibst. Google möchte hier ein konkretes Datum und keine Zeitspanne.

Es gibt gerade einen anderen aktuellen Thread zu diesem Thema. Einfach Ort mal reinschauen.

---

<div class="post-metadata">

### Author: ![tom\_prok](https://avatars.discourse-cdn.com/v4/letter/t/e99b99/32.png) [@tom\_prok](https://forum.shopware.com/u/tom_prok)
#### Post date: [13. Juni 2023 um 12:35 UTC](https://forum.shopware.com/t/fehlendes-attribut-verfuegbarkeitsdatum/100072/3 "2023-06-13T12:35:49Z")

</div>

> [@Google Merchant Center- Verfügbarkeitsdatum, korrektes Format?](https://forum.shopware.com/t/google-merchant-center-verfuegbarkeitsdatum-korrektes-format/100057/27):
>
> Die Verfügbarkeit ist ein Plichtfeld: [Availability [availability] - Google Merchant Center Help](https://support.google.com/merchants/answer/6324448?hl=en) Das Verfügbarkeitsdatum ist nur Plicht, wenn die Verfügbarkeit auf preorder oder backorder gesetzt ist: [Availability date [availability\_date] - Google Merchant Center Help](https://support.google.com/merchants/answer/6324470?hl=en&ref_topic=6324338&sjid=11615635144485542455-EU) Fragst du in deiner dynamischen Produktgruppe den Bestand der Artikel ab? Wenn du nur verfügbare Artikel (also mit Bestand) an Google übergibst, kannst du in einfach \<g:availability\>in\_stock\</g:availability\> hinzufügen und brauch…

---

<div class="post-metadata">

### Author: ![E-VS](https://avatars.discourse-cdn.com/v4/letter/e/3e96dc/32.png) [@E-VS](https://forum.shopware.com/u/E-VS)
#### Post date: [13. Juni 2023 um 16:00 UTC](https://forum.shopware.com/t/fehlendes-attribut-verfuegbarkeitsdatum/100072/4 "2023-06-13T16:00:14Z")

</div>

Ich habe nicht nur verfügbare Artikel sonst wäre es ja kein Problem die funktionieren ja auch.  
Ich habe Produkte die wir auf Anfrage bestellen oder Lieferbar in X Tagen sind und die sind das Problem.

---

<div class="post-metadata">

### Author: ![tom\_prok](https://avatars.discourse-cdn.com/v4/letter/t/e99b99/32.png) [@tom\_prok](https://forum.shopware.com/u/tom_prok)
#### Post date: [15. Juni 2023 um 07:25 UTC](https://forum.shopware.com/t/fehlendes-attribut-verfuegbarkeitsdatum/100072/5 "2023-06-15T07:25:57Z")

</div>

Könntest du mal deinen kompletten Code aus dem Template für den XML Export teilen?

Wenn du Produkte mit einer anderen Availability als `in_stock` übergibst, also z.B. `preorder` musst du ein konkretes Datum für das `availability_date` übergeben, also z.B. `<g:availability_date>2016-11-25T13:00-0800</g:availability_date>`

---

<div class="post-metadata">

### Author: ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)
#### Post date: [15. Juni 2023 um 07:57 UTC](https://forum.shopware.com/t/fehlendes-attribut-verfuegbarkeitsdatum/100072/6 "2023-06-15T07:57:25Z")

</div>

Einfach ein if um das `<g:availability_date>` packen, dann ist die Sache gelöst.

---

<div class="post-metadata">

### Author: ![rotknecht](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rotknecht](https://forum.shopware.com/u/rotknecht)
#### Post date: [19. Oktober 2023 um 20:48 UTC](https://forum.shopware.com/t/fehlendes-attribut-verfuegbarkeitsdatum/100072/7 "2023-10-19T20:48:47Z")

</div>

Ich habe dasselbe Problem. Unsere Produkte werden nach Bestellung gefertigt und haben dann eine Lieferzeit von zum Beispiel 4 Wochen.

Der Code sieht bei mir so aus:

```auto
    <g:availability>
        {%- if product.availableStock >= product.minPurchase and product.deliveryTime -%}
            in_stock
        {%- elseif product.availableStock < product.minPurchase and product.deliveryTime and product.restockTime -%}
            preorder
        {%- else -%}
            out_of_stock
        {%- endif -%}
    </g:availability>

```

Was müsste ich da ändern?
