Skip to content
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

[ECP-9601] ]Alternative Payment Methods | Payment method title is not translatable on website or store view level #2854

Open
aschrammel opened this issue Jan 17, 2025 · 7 comments
Assignees
Labels
Breaking change Indicates a change that has caused a major version update Bug report Indicates that issue has been marked as a possible bug

Comments

@aschrammel
Copy link
Contributor

Describe the bug
For the payment method CC, it is possible to override the default title shown on in the payment step on website or store view level utilizing the config path payment/adyen_cc/title.

For alternative payment methods this only works on default scope but not when set for on website or store view level. As payment methods may be translated for different countries, configurations on this more specific levels also should be taken into account correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Configure e.g. "Klarna" payments to be shown in your store. By default it will be shown as Klarna
  2. In the database (as this config is not available via backend) add following:
    INSERT INTO core_config_data SET scope="default", scope_id=0, path="payment/adyen_klarna/title", value="Test title";
  3. Clear the config cache
  4. Go to checkout
  5. The title "Test title" is shown for the payment method
  6. Adjust the config value to store view level:
    `UPDATE core_config_data SET scope="stores", scope_id=<your_store_id_here> WHERE path="payment/adyen_klarna/title";
  7. Repeat steps 4 and 5
  8. The default title "Klarna" is shown for the payment method

Expected behavior
When a title for an alternative payment method is configured on website or store view level, this configuration is taken into account correctly, as it is already done for the CC payment method.

Magento version
2.4.6-p8

Plugin version
9.12.2

Additional context

  • The title for CC payment methods is set in \Adyen\Payment\Model\Ui\AdyenCcConfigProvider::getConfig
  • No equivalent could be found for alternative payment (PM) methods
@aschrammel aschrammel added the Bug report Indicates that issue has been marked as a possible bug label Jan 17, 2025
@candemiralp
Copy link
Member

Hello @aschrammel,

Thank you for creating this issue. It's a known issue and we already have an internal investigation about this issue. I am linking these two together and you will be informed once we make a decision.

Best Regards,
Can

@candemiralp candemiralp changed the title Alternative Payment Methods | Payment method title is not translatable on website or store view level [ECP-9564] Alternative Payment Methods | Payment method title is not translatable on website or store view level Jan 20, 2025
@aschrammel
Copy link
Contributor Author

aschrammel commented Jan 20, 2025

Hi @candemiralp,

Thanks a lot for your timely feedback. Do you have a rough estimation on when you could provide a feedback on the decision? Our customer is planning to roll out new payment methods in the very near future and having the titles not translated is a show stopper here.

As the rollout is planned in multiple stores with different languages simultaneously, a workaround be just setting the title in DEFAULT scope doesn't work ufortunately.

@candemiralp
Copy link
Member

candemiralp commented Jan 24, 2025

Hello @aschrammel,

I've checked the issue and I confirm that my local instance can get the title based on the configuration value.

Steps

  1. Added configuration value for payment/adyen_klarna/title for default scope with scope_id = 0 as Test Klarna and observed the checkout.
  2. Create a new store and store view under the same website. Locale is set as Turkish (tr_TR) for this store view.
  3. Added another configuration value for payment/adyen_klarna/title for store scope with scope_id = 2 as Simdi Al, Sonra Ode and observed the checkout.

Please see my screenshots below.

DB
Image

TR Store
Image

Default Store
Image

Am I missing anything while testing this issue or can we assume this issue is not relevant anymore?

Best Regards,
Can

@candemiralp candemiralp changed the title [ECP-9564] Alternative Payment Methods | Payment method title is not translatable on website or store view level Alternative Payment Methods | Payment method title is not translatable on website or store view level Jan 24, 2025
@aschrammel
Copy link
Contributor Author

Good morning @candemiralp,

Thanks a lot for your feedback. Unfortunately I can't confirm it working.
Retried it again, given your instructions and adding the title in the default scope as well. This time it worked, when set via database:
Image

Image

As our configuration is mostly done via environment variables, as outlined in the official documentation, I'v double checked that as well and it's working here too.

Given following settings:

      CONFIG__DEFAULT__PAYMENT__ADYEN_KLARNA__TITLE: "Klarna default ENV var"
      CONFIG__STORES__B2C_AT_DE__PAYMENT__ADYEN_KLARNA__TITLE: "Klarna AT ENV var"

I get following result:
Image

Can't tell, why it hasn't worked last time, but given it's fine now, I'm closing the issue.

Thanks a lot for double checking and coming back to this.

@candemiralp
Copy link
Member

Hello @aschrammel,

Thank you for checking it out. Please don't hesitate to reach out if you have issues later on.

Best Regards,
Can

@aschrammel
Copy link
Contributor Author

Hello @candemiralp,

There's one more issue were we already stumbled upon this and mitigated it by just patching the config XML, as it is a country specific payment and hence not an issue with different languages. Nonetheless, I'd like to share that finding with you, as it behaves a bit special:

We have P24 active in Poland. Our patch to rewrite the title is following:
Image

I now wanted to give it a retry to set it via configuration, but that's not working as expected due to the fact, that the configuration path is not all lower case.

So doing following configuration in the database works as expected:
Image

But following doesn't:
Image

As already outlined before, we're configuring such things using environment variables. The path in that case would look like CONFIG__STORES__B2C_PL_PL__PAYMENT__ADYEN_ONLINEBANKING_PL__TITLE: "Przelewy 24". Unfortunately this isn't working as expected, due to the fact that Magento translates those env variable paths to all lower case, which results in a config path like in the second database example above.

Given that, I'd like to raise the question if this could be a thing to streamline the configuration paths to not use uppercase characters in it. I know it's a breaking change, so that my be worth a thought as well together with the changes considered in #2858.

Best regards,
Andreas

@aschrammel aschrammel reopened this Jan 27, 2025
@candemiralp
Copy link
Member

Hello @aschrammel,

Thank you very much sharing this concern. Indeed, it's valid and important case which we haven't realised before. We will consider updating the configuration paths to use lowercase characters. As you mentioned, it's a breaking change but we are already preparing the next major version. We can include this in the scope of the breaking changes.

I will keep you updated after discussing internally.

Best Regards,
Can

@candemiralp candemiralp changed the title Alternative Payment Methods | Payment method title is not translatable on website or store view level [ECP-9601] ]Alternative Payment Methods | Payment method title is not translatable on website or store view level Jan 30, 2025
@candemiralp candemiralp added the Breaking change Indicates a change that has caused a major version update label Jan 30, 2025
@candemiralp candemiralp added this to the Adyen Payment 10.0.0 milestone Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking change Indicates a change that has caused a major version update Bug report Indicates that issue has been marked as a possible bug
Projects
None yet
Development

No branches or pull requests

2 participants