# Versandkosten Bedingung wird ignoriert

**URL:** <https://forum.shopware.com/t/versandkosten-bedingung-wird-ignoriert/44318>\
**Category:** Administration\
**Created:** [8. März 2017 um 12:51 UTC](https://forum.shopware.com/t/versandkosten-bedingung-wird-ignoriert/44318 "2017-03-08T12:51:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![elli](https://avatars.discourse-cdn.com/v4/letter/e/58f4c7/32.png) [@elli](https://forum.shopware.com/u/elli)\
**Post date:** [8. März 2017 um 12:51 UTC](https://forum.shopware.com/t/versandkosten-bedingung-wird-ignoriert/44318/1 "2017-03-08T12:51:16Z")

</div>

Hallo zusammen,

ich habe Versankosten “Spedition” angelegt welche greifen soll wenn das Gewicht 15kg übersteigt und die Länge \> 1m ist und zu dem bestimmte PLZ-Gebiete beinhaltet. In den Bedingungen steht folgendes

```
gesamtgewicht >15 AND IFNULL(us.zipcode,ub.zipcode) LIKE '2%' OR IFNULL(us.zipcode,ub.zipcode) LIKE '3%' OR IFNULL(us.zipcode,ub.zipcode) LIKE '4%' OR IFNULL(us.zipcode,ub.zipcode) LIKE '5%' OR IFNULL(us.zipcode,ub.zipcode) LIKE '6%' OR IFNULL(us.zipcode,ub.zipcode) LIKE '7%' OR IFNULL(us.zipcode,ub.zipcode) LIKE '8%' OR IFNULL(us.zipcode,ub.zipcode) LIKE '9%' AND laenge > 1000

```

Leider wird gesamtgewicht dabei immer ignoriert…&nbsp;

wenn ich nur die Bedinung&nbsp;

```
gesamtgewicht >15

```

stehen lasse funktioniert es. Kann mir jemand helfen?

---

<div class="post-metadata">

**Author:** ![Jens\_K](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@Jens\_K](https://forum.shopware.com/u/Jens_K)\
**Post date:** [8. März 2017 um 13:13 UTC](https://forum.shopware.com/t/versandkosten-bedingung-wird-ignoriert/44318/2 "2017-03-08T13:13:40Z")

</div>

Hallo,

das beschriebene Verhalten tritt wahrscheinlich auf, weil die Bedinungen nicht richtig verknüpft sind.&nbsp;

```
gesamtgewicht >15 AND (IFNULL(us.zipcode,ub.zipcode) LIKE '2%' OR IFNULL(us.zipcode,ub.zipcode) LIKE '3%' OR IFNULL(us.zipcode,ub.zipcode) LIKE '4%' OR IFNULL(us.zipcode,ub.zipcode) LIKE '5%' OR IFNULL(us.zipcode,ub.zipcode) LIKE '6%' OR IFNULL(us.zipcode,ub.zipcode) LIKE '7%' OR IFNULL(us.zipcode,ub.zipcode) LIKE '8%' OR IFNULL(us.zipcode,ub.zipcode) LIKE '9%') AND laenge > 1000

```

Die Abfrage der PLZ-Gebiete muss von einer Klammer umgeben sein, ansonsten bezieht sich die _AND_ Bedingung nach _gesamtgewicht \>15_ nur auf die nachfolgende Bedingung _IFNULL(us.zipcode,ub.zipcode) LIKE ‚2%‘_

Viele Grüße,

Jens

&nbsp;

---

<div class="post-metadata">

**Author:** ![elli](https://avatars.discourse-cdn.com/v4/letter/e/58f4c7/32.png) [@elli](https://forum.shopware.com/u/elli)\
**Post date:** [8. März 2017 um 13:16 UTC](https://forum.shopware.com/t/versandkosten-bedingung-wird-ignoriert/44318/3 "2017-03-08T13:16:06Z")

</div>

Danke Jens! Funktioniert!
