From: Jan Büren Date: Fri, 11 Feb 2022 14:08:49 +0000 (+0100) Subject: Shopware: Bessere Fehlermeldung, dass Titel nur 255 Zeichen haben darf X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~218^2~2 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=72ee406708bfaa53fbc0217ebb5df297579beeba;p=kivitendo-erp.git Shopware: Bessere Fehlermeldung, dass Titel nur 255 Zeichen haben darf --- diff --git a/SL/ShopConnector/Shopware6.pm b/SL/ShopConnector/Shopware6.pm index 79a709c71..980923ef7 100644 --- a/SL/ShopConnector/Shopware6.pm +++ b/SL/ShopConnector/Shopware6.pm @@ -180,7 +180,11 @@ sub update_part { } undef $update_p->{partNumber}; # we dont need this one $ret = $self->connector->PATCH('api/product/' . $one_d->{id}, to_json($update_p)); - die "Updating part with " . $part->partnumber . " failed: " . $ret->responseContent() unless (204 == $ret->responseCode()); + unless (204 == $ret->responseCode()) { + die t8('Part Description is too long for this Shopware version. It should have lower than 255 characters.') + if $ret->responseContent() =~ m/Diese Zeichenkette ist zu lang. Sie sollte.*255 Zeichen/; + die "Updating part with " . $part->partnumber . " failed: " . $ret->responseContent() unless (204 == $ret->responseCode()); + } } else { # create part # 1. get the correct tax for this product