# LineItems zu Order "This value should not be blank."

**URL:** <https://forum.shopware.com/t/lineitems-zu-order-this-value-should-not-be-blank/98641>\
**Category:** Programmierung\
**Tags:** programming\
**Created:** [21. Februar 2023 um 11:46 UTC](https://forum.shopware.com/t/lineitems-zu-order-this-value-should-not-be-blank/98641 "2023-02-21T11:46:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zagga](https://avatars.discourse-cdn.com/v4/letter/z/cdc98d/32.png) [@Zagga](https://forum.shopware.com/u/Zagga)\
**Post date:** [21. Februar 2023 um 11:46 UTC](https://forum.shopware.com/t/lineitems-zu-order-this-value-should-not-be-blank/98641/1 "2023-02-21T11:46:44Z")

</div>

Moin Moin,

ich versuche jetzt schon länger ein LineItem für einen Aufbauservice zum Warenkorb hinzuzufügen.  
Das klappt auch ganz ordentlich. Allerdings kann ich damit keine Bestellung aufgeben, da folgender Fehler kommt.

> [/0/lineItems/0/0/lineItems/0/filter/identifiers] This value should not be blank.

Erstellt wird das LineItem am Anfang wie folgt:

```php
$lineItem = $this->factory->create([
            'id' => Uuid::randomHex(),
            'type' => 'assemblyservice',
            'referencedId' => Uuid::randomHex(),
            'quantity' => 1,
            $lineItem->setPriceDefinition($surchargeDefinition);
            $lineItem->setPayload($payload);
], $this->context);

```

Und am Ende meines Processors sieht es etwa so aus:

```auto
Shopware\Core\Checkout\Cart\LineItem\LineItem {#3741 ▼
  #payload: array:6 [▶]
  #id: "bfc3e27a3f5048b7b63f7b9bad02789e"
  #referencedId: "06b9082972fa4bc79f9c81d29dbd9a6d"
  #label: "Aufbauservice für"
  #quantity: 1
  #type: "assemblyservice"
  #priceDefinition: Shopware\Core\Checkout\Cart\Price\Struct\AbsolutePriceDefinition {#3851 ▼
    #price: 60.0
    #filter: Shopware\Core\Checkout\Cart\Rule\LineItemRule {#3904 ▶}
    #extensions: []
  }
  #price: Shopware\Core\Checkout\Cart\Price\Struct\CalculatedPrice {#4785 ▼
    #unitPrice: 60.0
    #quantity: 1
    #totalPrice: 60.0
    #calculatedTaxes: Shopware\Core\Checkout\Cart\Tax\Struct\CalculatedTaxCollection {#4782 ▶}
    #taxRules: Shopware\Core\Checkout\Cart\Tax\Struct\TaxRuleCollection {#4780 ▶}
    #referencePrice: null
    #listPrice: null
    #regulationPrice: null
    #extensions: []
  }
  #good: true
  #description: "TEST"
  #cover: null
  #deliveryInformation: null
  #children: Shopware\Core\Checkout\Cart\LineItem\LineItemCollection {#1814 ▼
    #elements: []
    #extensions: []
  }
  #requirement: null
  #removable: true
  #stackable: false
  #quantityInformation: null
  #modified: false
  #dataTimestamp: null
  #dataContextHash: null
  #states: []
  #extensions: []
}

```

Ich weiß echt nicht mehr was da noch fehlt^^

---

<div class="post-metadata">

**Author:** ![Zagga](https://avatars.discourse-cdn.com/v4/letter/z/cdc98d/32.png) [@Zagga](https://forum.shopware.com/u/Zagga)\
**Post date:** [21. Februar 2023 um 13:49 UTC](https://forum.shopware.com/t/lineitems-zu-order-this-value-should-not-be-blank/98641/2 "2023-02-21T13:49:31Z")

</div>

Problem gelöst. Der Filter der priceDefinition war unvollständig
