Jump to content

Recommended Posts

Posted

Hello All .

 

today i will share with you a simple hack to convert gateways name to multilanguages .

 

open gateway_manager.php in app/models .

 

in getAllInstalledNonmerchant function .

 

saerch

foreach ($gateways as &$gw) {
   // Fetch all meta data for this gateway
   $gw->meta = $this->getMeta($gw->id);
   // Fetch all currencies for this gateway
   $gw->currencies = $this->getCurrencies($gw->id);
  }

replace with

foreach ($gateways as &$gw) {
   // Fetch all meta data for this gateway
   $gw->meta = $this->getMeta($gw->id);
   // Fetch all currencies for this gateway
   $gw->currencies = $this->getCurrencies($gw->id);
   // Convert gateway name to multilanguages
   $gateway = $this->loadGateway($gw->class, $gw->type);
   $gw->name = $gateway->getName() ;
  }

as you all see , is s imple fix with just two line of codes . i hope blesta staff can add it to the next version .

Posted
  On 9/27/2015 at 1:02 AM, kpmedia said:

I'm guessing that this doesn't change the gateway's language to en_us to something else, but merely changes ... something else?

The name of the plugin?

 

this patch if you use multiple languages in blesta like _es_es , fr_fr , ar_sa  . so some gateway hs a different name from the default one es_us , it use the name in languages file instead of saved names in database .

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...