-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PIPRES-468 "Title" multilanguage functionality #997
PIPRES-468 "Title" multilanguage functionality #997
Conversation
$this->context = $context; | ||
} | ||
|
||
public function savePaymentTitleTranslation(string $idPaymentMethod, int $langId, string $translation, int $idShop) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move to repository
@@ -104,10 +107,22 @@ public function getPaymentOption(MolPaymentMethod $paymentMethod): PaymentOption | |||
{ | |||
$paymentOption = new PaymentOption(); | |||
|
|||
/** @var Context $shopContext */ | |||
$shopContext = $this->module->getService(Context::class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$context not shop context
@@ -128,10 +130,23 @@ public function __construct( | |||
public function getPaymentOption(MolPaymentMethod $paymentMethod): PaymentOption | |||
{ | |||
$paymentOption = new PaymentOption(); | |||
|
|||
/** @var Context $shopContext */ | |||
$shopContext = $this->module->getService(Context::class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
@@ -126,10 +128,22 @@ public function getPaymentOption(MolPaymentMethod $paymentMethod): PaymentOption | |||
{ | |||
$paymentOption = new PaymentOption(); | |||
|
|||
/** @var Context $shopContext */ | |||
$shopContext = $this->module->getService(Context::class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
upgrade/Upgrade-6.2.5.php
Outdated
return Db::getInstance()->execute($sql); | ||
} | ||
|
||
function deleteAndUpdatePaymentMethodTitles() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does not look this method is deleting anything
b0d8416
into
mollie:PIPRES-468/title-multilang
Created feature for merchants to allow translating payment method titles.
Made a service for easier using
PaymentMethodLangService
Methods:
savePaymentTitleTranslation
- saves new translation or updated existingtrans
- gets translation by customer selected language on frontendgetTransList
- gets all existing translations for givenpayment_id
as array[id_lang => "translation"]