Blesta Addons Posted September 19, 2015 Report Posted September 19, 2015 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 . a.daniello and serge 2
activa Posted September 20, 2015 Report Posted September 20, 2015 nice share , worked like a charm . a huge debate in so many threads just for this 2 lines
kpmedia Posted September 27, 2015 Report Posted September 27, 2015 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?
Blesta Addons Posted September 27, 2015 Author Report Posted September 27, 2015 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 .
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now