# page.cart.lineItems is null

**URL:** <https://forum.shopware.com/t/page-cart-lineitems-is-null/104336>\
**Category:** Shopware 6 (German)\
**Created:** [20. Juni 2024 um 11:00 UTC](https://forum.shopware.com/t/page-cart-lineitems-is-null/104336 "2024-06-20T11:00:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nilik](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/nilik/32/24768_2.png) [@Nilik](https://forum.shopware.com/u/Nilik)\
**Post date:** [20. Juni 2024 um 11:00 UTC](https://forum.shopware.com/t/page-cart-lineitems-is-null/104336/1 "2024-06-20T11:00:32Z")

</div>

Hallo,

bei mir ist die `page.cart.lineItems` oder `page.cart` gleich `null`, obwohl ich Artikel im Warenkorb habe. Ich weiß nicht warum und weshalb. Kennt jemand ein paar Ansätze, das herauszufinden?

Shopware-Version 6.5.8.7

---

<div class="post-metadata">

**Author:** ![EikeBrandtWarneke](https://avatars.discourse-cdn.com/v4/letter/e/cdc98d/32.png) [@EikeBrandtWarneke](https://forum.shopware.com/u/EikeBrandtWarneke)\
**Post date:** [20. Juni 2024 um 11:02 UTC](https://forum.shopware.com/t/page-cart-lineitems-is-null/104336/2 "2024-06-20T11:02:59Z")

</div>

Auf welcher Seite bzw in welchem Controller denn? Der cart ist nur im checkout verfügbar, denn sonst würde der http cache nicht funktionieren.

Viele Grüße

---

<div class="post-metadata">

**Author:** ![Nilik](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/nilik/32/24768_2.png) [@Nilik](https://forum.shopware.com/u/Nilik)\
**Post date:** [20. Juni 2024 um 11:05 UTC](https://forum.shopware.com/t/page-cart-lineitems-is-null/104336/3 "2024-06-20T11:05:44Z")

</div>

> <https://github.com/shopware/shopware/blob/v6.5.8.7/src/Storefront/Resources/views/storefront/layout/header/actions/cart-widget.html.twig>

Hier müsste es etwas ausgeben.

Um das zu Debuggen, habe ich es in eigenes Theme ausgelagert und stelle nun fest, dass es eben leer ist. Weil ich mich wunderte, dass die Anzahl der Artikel im Warenkorb oben im Header nicht angezeigt wird.

---

<div class="post-metadata">

**Author:** ![EikeBrandtWarneke](https://avatars.discourse-cdn.com/v4/letter/e/cdc98d/32.png) [@EikeBrandtWarneke](https://forum.shopware.com/u/EikeBrandtWarneke)\
**Post date:** [20. Juni 2024 um 11:15 UTC](https://forum.shopware.com/t/page-cart-lineitems-is-null/104336/4 "2024-06-20T11:15:47Z")

</div>

Im Shopware Standard funktioniert der mini Warenkorb im header einwandfrei. Am besten mal alle Plugins und Themes deaktivieren und erneut testen.

Viele Grüße

---

<div class="post-metadata">

**Author:** ![Nilik](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/nilik/32/24768_2.png) [@Nilik](https://forum.shopware.com/u/Nilik)\
**Post date:** [21. Juni 2024 um 08:31 UTC](https://forum.shopware.com/t/page-cart-lineitems-is-null/104336/5 "2024-06-21T08:31:35Z")

</div>

Es lag tatsächlich am Theme.

Es fehlte im a-tag das `data-cart-widget="true"` in [shopware/src/Storefront/Resources/views/storefront/layout/header/header.html.twig at v6.5.8.7 · shopware/shopware · GitHub](https://github.com/shopware/shopware/blob/v6.5.8.7/src/Storefront/Resources/views/storefront/layout/header/header.html.twig) im Block „layout\_header\_actions\_cart“.
