# Gutscheine nicht einlösbar

**URL:** <https://forum.shopware.com/t/gutscheine-nicht-einlosbar/64619>\
**Category:** Allgemein\
**Created:** [11. Februar 2020 um 16:07 UTC](https://forum.shopware.com/t/gutscheine-nicht-einlosbar/64619 "2020-02-11T16:07:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![INKICKS](https://avatars.discourse-cdn.com/v4/letter/i/85e7bf/32.png) [@INKICKS](https://forum.shopware.com/u/INKICKS)\
**Post date:** [11. Februar 2020 um 16:07 UTC](https://forum.shopware.com/t/gutscheine-nicht-einlosbar/64619/1 "2020-02-11T16:07:00Z")

</div>

Hallo zusammen,

bei uns können keine Gutscheine eingelöst werden (Fehlermeldung bei einlösen: Leider ist etwas schief gelaufen.). Die getesten Codes sind wie in der Shopware Doku eingesellt, wobei diese für die Gutschein Erstellung jetzt nicht zwingend erforderlich war. Also Verkaufkanal zugewiesen, Aktiv von bis, Anzahl insgesamt und pro Kunde, Aktionscodes verwenden aktiviert mit dazugehörigem Code.

Bei Bedingungen haben wir nicht ausgewählt, da dort ja steht: “Ohne eine Eingrenzung haben alle Deine Kunden Zugriff auf diese Aktion.”.

Und bei Rabatte haben wir Warenkorb eingestellt und eben noch Art und Wert.

Haben wir irgendwo einen Denkfehler oder muss die Gutscheinoption noch irgendwo ähnlich wie Zahlungen und Versand im Verkaufskanal aktiviert werden?

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![INKICKS](https://avatars.discourse-cdn.com/v4/letter/i/85e7bf/32.png) [@INKICKS](https://forum.shopware.com/u/INKICKS)\
**Post date:** [13. Februar 2020 um 15:52 UTC](https://forum.shopware.com/t/gutscheine-nicht-einlosbar/64619/2 "2020-02-13T15:52:35Z")

</div>

Sonst funktionieren bei allen die Gutscheine?

---

<div class="post-metadata">

**Author:** ![Moritz\_Naczenski](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/moritz_naczenski/32/7792_2.png) [@Moritz\_Naczenski](https://forum.shopware.com/u/Moritz_Naczenski)\
**Post date:** [13. Februar 2020 um 19:51 UTC](https://forum.shopware.com/t/gutscheine-nicht-einlosbar/64619/3 "2020-02-13T19:51:26Z")

</div>

Schau doch mal ins log, was für ein Fehler dahinter steckt. Das findest du in var/log im Shopware Verzeichnis. Am besten die korrekte Urzeit raussuchen wann du es probiert hast.

---

<div class="post-metadata">

**Author:** ![INKICKS](https://avatars.discourse-cdn.com/v4/letter/i/85e7bf/32.png) [@INKICKS](https://forum.shopware.com/u/INKICKS)\
**Post date:** [9. März 2020 um 12:44 UTC](https://forum.shopware.com/t/gutscheine-nicht-einlosbar/64619/4 "2020-03-09T12:44:06Z")

</div>

[@Moritz Naczenski]([http://forum.shopware.com/profile/14574/Moritz](http://forum.shopware.com/profile/14574/Moritz) Naczenski „Moritz Naczenski“)‍

Bekomme folgende Fehlermeldung im var/log (unseren Server, den Gutscheincode usw. hab ich durch xxxx in der Fehlermeldung ersetzt):

&nbsp;

„request.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\ForeignKeyConstraintViolationException: „An exception occurred while executing ‚INSERT INTO `hatslogic_abandoned_cart_items` (`id`, `abandoned_cart_id`, `product_id`, `product_version_id`, `label`, `payload`, `quantity`, `unit_price`, `total_price`, `price_definition`, `price`, `created_at`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)‘ with params [“\x82\x4f\x87\x84\x8f\x3b\x48\x03\x80\xeb\x4b\x44\x3f\x5b\x2c\xfd“, „\x43\x25\xea\x63\x14\x66\x44\x2a\xab\x36\xda\x18\x14\x01\xf3\x79“, „\xaa\x8a\xa3\x79\x73\x46\x4f\xbb\xb2\x85\xbf\x8a\x45\x5c\xe5\xf3“, „\x0f\xa9\x1c\xe3\xe9\x6a\x4b\xc2\xbe\x4b\xd9\xce\x75\x2c\x34\x25“, „Gutschein xxxx“, „{„promotionId“:„b37dada6208d4feead541a3185dcc8eb“,„discountId“:„aa8aa37973464fbbb285bf8a455ce5f3“,„discountType“:„percentage“,„code“:„xxxx“,„value“:„14“,„maxValue“:“",„discountScope“:„cart“,„groupId“:"",„setGroups“:,„filter“:{„sorterKey“:null,„applierKey“:null,„usageKey“:null},„composition“:[{„id“:„b1af7e751fe447b883f286ddf791d128“,„quantity“:1,„discount“:13.9860000000000024300561562995426356792449951171875}]}", 1, -13.9900000000000002131628207280300557613372802734375, -13.9900000000000002131628207280300557613372802734375, „{„percentage“:-14.0,„filter“:null,„precision“:2,„type“:„percentage“}“, „{„unitPrice“:-13.9900000000000002131628207280300557613372802734375,„totalPrice“:-13.9900000000000002131628207280300557613372802734375,„quantity“:1,„calculatedTaxes“:[{„tax“:-2.229999999999999982236431605997495353221893310546875,„taxRate“:19.0,„price“:-13.9900000000000002131628207280300557613372802734375,„extensions“:}],„taxRules“:[{„taxRate“:19.0,„percentage“:100.0,„extensions“:}],„referencePrice“:null,„listPrice“:null}“, „2020-02-20 20:08:59.648“]: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`d0300d03`.`hatslogic_abandoned_cart_items`, CONSTRAINT `fk.hatslogic_abandoned_cart_items.product_id` FOREIGN KEY (`product_id`, `product_version_id`) REFERENCES `product` (`id`, `version_id`)" at /www/htdocs/xxxx/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 49 {„exception“:"[object] (Doctrine\DBAL\Exception\ForeignKeyConstraintViolationException(code: 0): An exception occurred while executing ‚INSERT INTO `hatslogic_abandoned_cart_items` (`id`, `abandoned_cart_id`, `product_id`, `product_version_id`, `label`, `payload`, `quantity`, `unit_price`, `total_price`, `price_definition`, `price`, `created_at`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)‘ with params ["\x82\x4f\x87\x84\x8f\x3b\x48\x03\x80\xeb\x4b\x44\x3f\x5b\x2c\xfd", „\x43\x25\xea\x63\x14\x66\x44\x2a\xab\x36\xda\x18\x14\x01\xf3\x79“, „\xaa\x8a\xa3\x79\x73\x46\x4f\xbb\xb2\x85\xbf\x8a\x45\x5c\xe5\xf3“, „\x0f\xa9\x1c\xe3\xe9\x6a\x4b\xc2\xbe\x4b\xd9\xce\x75\x2c\x34\x25“, „Gutschein xxxx“, „{\„promotionId\“:\„b37dada6208d4feead541a3185dcc8eb\“,\„discountId\“:\„aa8aa37973464fbbb285bf8a455ce5f3\“,\„discountType\“:\„percentage\“,\„code\“:\„xxxx\“,\„value\“:\„14\“,\„maxValue\“:\“\",\„discountScope\“:\„cart\“,\„groupId\“:\"\",\„setGroups\“:,\„filter\“:{\„sorterKey\“:null,\„applierKey\“:null,\„usageKey\“:null},\„composition\“:[{\„id\“:\„b1af7e751fe447b883f286ddf791d128\“,\„quantity\“:1,\„discount\“:13.9860000000000024300561562995426356792449951171875}]}", 1, -13.9900000000000002131628207280300557613372802734375, -13.9900000000000002131628207280300557613372802734375, „{\„percentage\“:-14.0,\„filter\“:null,\„precision\“:2,\„type\“:\„percentage\“}“, „{\„unitPrice\“:-13.9900000000000002131628207280300557613372802734375,\„totalPrice\“:-13.9900000000000002131628207280300557613372802734375,\„quantity\“:1,\„calculatedTaxes\“:[{\„tax\“:-2.229999999999999982236431605997495353221893310546875,\„taxRate\“:19.0,\„price\“:-13.9900000000000002131628207280300557613372802734375,\„extensions\“:}],\„taxRules\“:[{\„taxRate\“:19.0,\„percentage\“:100.0,\„extensions\“:}],\„referencePrice\“:null,\„listPrice\“:null}“, „2020-02-20 20:08:59.648“]:\n\nSQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`d0300d03`.`hatslogic_abandoned_cart_items`, CONSTRAINT `fk.hatslogic_abandoned_cart_items.product_id` FOREIGN KEY (`product_id`, `product_version_id`) REFERENCES `product` (`id`, `version_id`) at /www/htdocs/xxxx/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:49, Doctrine\DBAL\Driver\PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`d0300d03`.`hatslogic_abandoned_cart_items`, CONSTRAINT `fk.hatslogic_abandoned_cart_items.product_id` FOREIGN KEY (`product_id`, `product_version_id`) REFERENCES `product` (`id`, `version_id`) at /www/htdocs/xxxx/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:123, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`d0300d03`.`hatslogic_abandoned_cart_items`, CONSTRAINT `fk.hatslogic_abandoned_cart_items.product_id` FOREIGN KEY (`product_id`, `product_version_id`) REFERENCES `product` (`id`, `version_id`) at /www/htdocs/xxxx/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:121)"} "

---

<div class="post-metadata">

**Author:** ![Moritz\_Naczenski](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/moritz_naczenski/32/7792_2.png) [@Moritz\_Naczenski](https://forum.shopware.com/u/Moritz_Naczenski)\
**Post date:** [9. März 2020 um 13:01 UTC](https://forum.shopware.com/t/gutscheine-nicht-einlosbar/64619/5 "2020-03-09T13:01:16Z")

</div>

Also in der Fehlermeldung steht etwas von „hatslogic\_abandoned\_cart\_items“&nbsp; - am&nbsp; besten das Plugin mal deativieren und nochmal testen.

---

<div class="post-metadata">

**Author:** ![INKICKS](https://avatars.discourse-cdn.com/v4/letter/i/85e7bf/32.png) [@INKICKS](https://forum.shopware.com/u/INKICKS)\
**Post date:** [9. März 2020 um 15:04 UTC](https://forum.shopware.com/t/gutscheine-nicht-einlosbar/64619/6 "2020-03-09T15:04:05Z")

</div>

Danke [@Moritz Naczenski]([http://forum.shopware.com/profile/14574/Moritz](http://forum.shopware.com/profile/14574/Moritz) Naczenski “Moritz Naczenski”)‍ Problem liegt wirklich an nem Plugin. Das was du genannt hast, habe ich deaktiviert und auch schon gelöscht, weil wir es nur zu Testzwecken genutzt haben und nicht weiter nutzen werden… Dann kam noch ein neues Plugin Problem dazu. Das hab ich auch deaktiviert und dann hat es funktioniert. Den Plugin Hersteller habe ich entsprechend&nbsp;kontaktiert.
