Skip to content

Commit

Permalink
NTR: fix translation problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitalij Mik committed Feb 29, 2024
1 parent 8317847 commit 7d733b4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Controller/Api/PluginConfig/ConfigControllerBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,10 @@ public function getRefundManagerConfigLegacy(Request $request, Context $context)
}

/**
* @Route("/api/_action/mollie/config/subscription", name="api.action.mollie.config.subscription-enabled", methods={"POST"})
* @Route("/api/_action/mollie/config/subscription", name="api.action.mollie.config.subscription", methods={"POST"})
* @return JsonResponse
*/
public function isSubscriptionEnabled():JsonResponse
public function getSubscriptionConfig(): JsonResponse
{
$config = $this->settings->getSettings();
return new JsonResponse([
Expand Down
7 changes: 7 additions & 0 deletions src/Service/PaymentMethodService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -176,6 +177,7 @@ 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'=>$existingPaymentMethod->getTranslated()
];

if ($this->versionCompare->gte('6.5.7.0')) {
Expand All @@ -193,6 +195,11 @@ public function addPaymentMethods(array $paymentMethods, Context $context): void
'description' => '',
'mediaId' => $mediaId,
'afterOrderEnabled' => true,
'translated'=>[
Defaults::LANGUAGE_SYSTEM=>[
'name' => $paymentMethod['description']
]
]
];
}

Expand Down

0 comments on commit 7d733b4

Please sign in to comment.