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

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 .

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...