X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FShopConnector%2FShopware6.pm;h=f8a22a9112bc2cfca556040565922a853c130ade;hb=08e48f66590f580cbe2c8e3df76883d88b4c0fef;hp=79a709c71fc724034444d1a20503f9b0e951f4d1;hpb=6e47b4668e7370af7f531af123a16581f4880079;p=kivitendo-erp.git diff --git a/SL/ShopConnector/Shopware6.pm b/SL/ShopConnector/Shopware6.pm index 79a709c71..f8a22a911 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 @@ -697,8 +701,8 @@ sub get_version { sub set_orderstatus { my ($self, $order_id, $transition) = @_; - croak "No order ID, should be in format [0-9a-f]{32}" unless $order_id =~ m/^[0-9a-f]{32}$/; - croak "NO valid transition value" unless $transition =~ m/(open|process|cancel|complete)/; + croak "No shop order ID, should be in format [0-9a-f]{32}" unless $order_id =~ m/^[0-9a-f]{32}$/; + croak "NO valid transition value" unless $transition =~ m/(open|process|cancel|complete)/; my $ret; $ret = $self->connector->POST("/api/_action/order/$order_id/state/$transition"); my $response_code = $ret->responseCode(); @@ -1073,6 +1077,12 @@ Right now the returning structure and the common parts of the filter are in two Many error messages are thrown, but at least the more common cases should be localized. +=item * Multi language support + +By guessing the correct german name for the english language some translation for parts can +also be synced. This should be more clear (language configuration for shops) and the order +synchronisation should also handle this (longdescription is simply copied from part.notes) + =back =head1 AUTHOR