Jump to content

Can you change/edit the name of a payment method?


Recommended Posts

Ive attached a picture. When going through checkout, the first payment method just says "pay online" but doesnt tell you what it it. Its Stripe payment method, id like to edit the text to say "Pay by Card with Stripe" or something similar to make it clear to customers what each payment method is before having to click it.

is that possible?

PS v8.1.5 - PHP v8.1

Screenshot 2024-07-07 083641.png

Edited by GamerWipes (see edit history)
Link to comment
Share on other sites

  • 7 months later...
  • 3 weeks later...

Hello, has anyone figured out how to translate the payment method name "Pay online"?

So far, I’ve only found a way to change it, but not to translate it. I’m using multistore, and I’d like to translate it into several languages (with different phrases).

In the stripe_official.php file, at line 291: $this->button_label[self::PM_CHECKOUT] = $this->translationService->translate('Pay online');

I know I can modify this, but I can’t find this phrase in the module translations in the back office, and I can’t get it into the translations in the PHP files in modules/stripe_official/translations/xx.php.

Or any idea on how to get this into the translation phrases in the PHP files? The description of the payment method (after selecting "Pay online") is in the phrases (as well as in the post before me), but the phrase "Pay online" itself is not.

Link to comment
Share on other sites

  On 3/16/2025 at 4:00 PM, mysho said:

Hello, has anyone figured out how to translate the payment method name "Pay online"?

So far, I’ve only found a way to change it, but not to translate it. I’m using multistore, and I’d like to translate it into several languages (with different phrases).

In the stripe_official.php file, at line 291: $this->button_label[self::PM_CHECKOUT] = $this->translationService->translate('Pay online');

I know I can modify this, but I can’t find this phrase in the module translations in the back office, and I can’t get it into the translations in the PHP files in modules/stripe_official/translations/xx.php.

Or any idea on how to get this into the translation phrases in the PHP files? The description of the payment method (after selecting "Pay online") is in the phrases (as well as in the post before me), but the phrase "Pay online" itself is not.

Expand  

Try with modules/stripe_official/translations/ and i.e fr.php and add:

$_MODULE['<{stripe_official}prestashop>stripe_official'] = array(
    'Pay online' => 'Payer en ligne',
);

Save and clear cache. ( Payer en ligne is translated sentence you need )

Link to comment
Share on other sites

Thank you for your response, but it didn’t help.

In stripe_official.php, I changed 'Pay online' to 'Stripe', so from now on, I'll be working with this name instead of 'Pay online'.

In fr.php, I tried various variations (with the help of ChatGPT 😆) – I even tried adding the MD5 hash (for 'Stripe', it's ce7566d1d08cc094b74cf283cf9c56a5), for example:

$_MODULE['<{stripe_official}prestashop>stripe_checkout_ce7566d1d08cc094b74cf283cf9c56a5'] = 'Payer en ligne';

or:

$_MODULE['<{stripe_official}prestashop>ce7566d1d08cc094b74cf283cf9c56a5'] = 'Payer en ligne';

But none of this worked.

In the translations table in the database, I also tried searching for translations. Some of the translations I did via the BO are there, and I wanted to try adding it directly into the DB. However, I don’t know what to put in the domain column. The few translations related to the Stripe module that are in the DB have domains like ModulesStripeofficialOrderconfirmation, ModulesStripeofficialPaymentinforedirect, ModulesStripeofficialHandlenextaction, etc.

Link to comment
Share on other sites

As it is the official Stripe module, why not ask Stripe for help / clarfication ?  When I have a problem with my payment module and asked them for help they helped me swiftly.

Link to comment
Share on other sites

Interested in this too, may too much time wasted on a simple thing 😕
The official doc does not mention anything about translations, I installed that Stripe solution in other CMS and did not see that bug.

 

Thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...