# Für Speditionsversand: Abfrage des Warenkorbs nach Artikel mit bestimmter Attribut Konstellation

**URL:** <https://forum.shopware.com/t/fur-speditionsversand-abfrage-des-warenkorbs-nach-artikel-mit-bestimmter-attribut-konstellation/48269>\
**Category:** Administration\
**Created:** [14. September 2017 um 14:55 UTC](https://forum.shopware.com/t/fur-speditionsversand-abfrage-des-warenkorbs-nach-artikel-mit-bestimmter-attribut-konstellation/48269 "2017-09-14T14:55:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndyB](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@AndyB](https://forum.shopware.com/u/AndyB)\
**Post date:** [14. September 2017 um 14:55 UTC](https://forum.shopware.com/t/fur-speditionsversand-abfrage-des-warenkorbs-nach-artikel-mit-bestimmter-attribut-konstellation/48269/1 "2017-09-14T14:55:05Z")

</div>

Ich möchte wenn sich bestimmte „Versandkostenfreie Speditionsartikel“ im Warenkorb befinden eine extra Versandart anbieten.

Die Bedingung ist also das im Warenkorb mindestens 1 Artikel liegt der „Versandkostenfrei“ ist und bei dem gleichzeitig das attr7 = 2 ist (das ist für Spedition).

Leider habe ich seit Stunden immer noch keine Lösung gefunden obwohl ich alles gelesen und ausprobiert habe.

Im Versandkosten-Modul hatte ich nun zu letzt die folgende Erweiterte SQL-Abfrage:

```
MAX(a.topseller) AS has_topseller, MAX(at.attr3) AS has_comment, MAX(b.esdarticle) AS has_esd, MIN(IF (d.shippingfree = 1 AND at.attr3 = 2 ,1,0)) AS vskfspedi

```

Und dann als eigene Bedingung natürlich vskfspedi = 1 hinterlegt. Wo liegt der Fehler? Syntax?

&nbsp;

---

<div class="post-metadata">

**Author:** ![AndyB](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@AndyB](https://forum.shopware.com/u/AndyB)\
**Post date:** [15. September 2017 um 07:22 UTC](https://forum.shopware.com/t/fur-speditionsversand-abfrage-des-warenkorbs-nach-artikel-mit-bestimmter-attribut-konstellation/48269/2 "2017-09-15T07:22:57Z")

</div>

Keiner einen Tipp? Habe ich einen Syntaxfehler/Denkfehler?

Ist das überhaupt möglich hier ein Produkt auf welches 2 Bedingungen zutreffen abzufragen?

Bin für jeden Tip dankbar.
