Improve display_title value, as end user doesn't care whether payment is going through Ogone or not...

Comments

marcus_w’s picture

Version: » 7.x-1.1

Hi Sven,

Do you have any idea how I can set the display_title different? Is it possible to set it via a hook?

Thanks

svendecabooter’s picture

This can be achieved in a custom module, via the following code:

function MODULENAME_commerce_payment_method_info_alter(&$payment_methods) {
  $payment_methods['ogone']['display_title'] = t('CUSTOM DISPLAY TITLE');
}
svendecabooter’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
marcus_w’s picture

Thanks, but using that hook, I can only change the module's display name.

My situation:
I have 2 ogone entries: 1 for paypal, 1 for ideal.
I 'duplicated' the first ogone and named it ogone_ideal.

Now I want to name 1 of them paypal an the other ideal. Any idea how that could be implemented?

Thanks

svendecabooter’s picture

Assigned: svendecabooter » Unassigned
Status: Active » Postponed

That should probably be something like this then:

function MODULENAME_commerce_payment_method_info_alter(&$payment_methods) {
  $payment_methods['ogone']['display_title'] = t('Ogone');
$payment_methods['ogone_ideal']['display_title'] = t('iDeal');
}
roball’s picture

Issue summary: View changes

Thank you svendecabooter!

The addition mentioned in #2 solved the problem perfectly for me.