From e29eff1da9d79ea4fc05a79e21bcaabfba00d2ba Mon Sep 17 00:00:00 2001 From: Vitalij Mik Date: Wed, 28 Feb 2024 15:55:18 +0100 Subject: [PATCH] NTR: fix translation problem --- src/Service/PaymentMethodService.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Service/PaymentMethodService.php b/src/Service/PaymentMethodService.php index 5d9c1e85d..ab45cc26b 100644 --- a/src/Service/PaymentMethodService.php +++ b/src/Service/PaymentMethodService.php @@ -37,6 +37,7 @@ use Shopware\Core\Checkout\Payment\PaymentMethodEntity; use Shopware\Core\Content\Media\MediaCollection; use Shopware\Core\Content\Media\MediaService; +use Shopware\Core\Defaults; use Shopware\Core\Framework\Context; use Shopware\Core\Framework\DataAbstractionLayer\Event\EntityWrittenContainerEvent; use Shopware\Core\Framework\DataAbstractionLayer\Exception\InconsistentCriteriaIdsException; @@ -176,6 +177,11 @@ public function addPaymentMethods(array $paymentMethods, Context $context): void # so we need to provide those with the value of # the existing method!!! 'name' => $existingPaymentMethod->getName(), + 'translated'=>[ + Defaults::LANGUAGE_SYSTEM=>[ + 'name' => $existingPaymentMethod->getName() + ] + ] ]; if ($this->versionCompare->gte('6.5.7.0')) { @@ -193,6 +199,11 @@ public function addPaymentMethods(array $paymentMethods, Context $context): void 'description' => '', 'mediaId' => $mediaId, 'afterOrderEnabled' => true, + 'translated'=>[ + Defaults::LANGUAGE_SYSTEM=>[ + 'name' => $paymentMethod['description'] + ] + ] ]; }