From b36c791b78f3ca3895187db2b3f30ce5b29543e7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Fri, 3 Dec 2021 15:35:09 +0100 Subject: [PATCH] =?utf8?q?Shopware6:=20utf8=20f=C3=BCr=20json=20kodieren?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/ShopConnector/Shopware6.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SL/ShopConnector/Shopware6.pm b/SL/ShopConnector/Shopware6.pm index b306014e8..2704a6d42 100644 --- a/SL/ShopConnector/Shopware6.pm +++ b/SL/ShopConnector/Shopware6.pm @@ -138,10 +138,10 @@ sub update_part { my $update_p; $update_p->{productNumber} = $part->partnumber; - $update_p->{name} = $part->description; + $update_p->{name} = _u8($part->description); $update_p->{description} = $shop_part->shop->use_part_longdescription - ? $part->notes - : $shop_part->shop_description; + ? _u8($part->notes) + : _u8($shop_part->shop_description); # locales simple check for english my $english = SL::DB::Manager::Language->get_first(query => [ description => { ilike => 'Englisch' }, @@ -151,8 +151,8 @@ sub update_part { # add english translation for product # TODO (or not): No Translations for shop_part->shop_description available my $translation = first { $english->id == $_->language_id } @{ $part->translations }; - $update_p->{translations}->{'en-GB'}->{name} = $translation->{translation}; - $update_p->{translations}->{'en-GB'}->{description} = $translation->{longdescription}; + $update_p->{translations}->{'en-GB'}->{name} = _u8($translation->{translation}); + $update_p->{translations}->{'en-GB'}->{description} = _u8($translation->{longdescription}); } $update_p->{stock} = $::form->round_amount($part->onhand, 0) if ($todo =~ m/(stock|all)/); -- 2.20.1