Camposinhos Posted July 5, 2011 Share Posted July 5, 2011 hi... help on php ???The history.tpl doens translate payment method once an order as been finished it stays on the language that was chosen. The other fields like history_state do translate without any fuss...I'm tryin to get a work arround this issue but i don't seem to get it working unless i put it explicitly... {l s='Bank wire'} .... (line 66)tried these aproaches but... with no luck..{$order.payment|escape:'htmlall':'UTF-8'}{sprintf("{l s='%s'}",{$order.payment})}{l s=sprintf("%s",{$order.payment})}Where am i messin'up :/ ??Thanks in advance. Link to comment Share on other sites More sharing options...
shokinro Posted July 6, 2011 Share Posted July 6, 2011 usually the payment method passed in from payment module when do order validation and saved in order database.usually the payment name is used like following one.$paypal->displayNameAt history page, it only retrieve from database, that's why it is not translatable. Link to comment Share on other sites More sharing options...
Camposinhos Posted July 6, 2011 Author Share Posted July 6, 2011 thanks skokinro...but that's something i already knew... i only need help on figuring out the php code in order to apply the translations to all payment methods in store... it's not great fun adding lines for each payment method...for the payment method 'bank wire' the php code ... {l s='bank wire'} works fine everytime... i need to make php code so it uses the variable $order.payment in order to translate all the existing payment methods in the store.thanks again. Link to comment Share on other sites More sharing options...
shokinro Posted July 6, 2011 Share Posted July 6, 2011 but I don't understand you have to translate it?if it is the already user selected "language". why do you have to translate it?I don't think there is an easy. Because if the module has already passed in the translated payment method.You have no idea what the translated text is which is saved in ps_order table, so it is difficult to translate this unknown text. Link to comment Share on other sites More sharing options...
Camposinhos Posted July 6, 2011 Author Share Posted July 6, 2011 but I don't understand you have to translate it?if it is the already user selected "language". why do you have to translate it?did you ever noticed the history summary and opened one sample buy ? if you notice all the field are translating to the language you want... except the payment method. it's only a cosmetic thing... not good looking having text in one language and one field (payment method) allways in the same language...I don't think there is an easy. Because if the module has already passed in the translated payment method.You have no idea what the translated text is which is saved in ps_order table, so it is difficult to translate this unknown text. i know that... the payment method is passed in the language that the order was made and checked-out... but it only passed it because the module was in store as well with its translations... ie... bankwire module (has its own translations in b.o.)... what a i need is to get a php code so its passes "concatenated" the single quote ' plus $order.payment plus single quote... so i can get the same code as "{l s='bank wire'}thanks Link to comment Share on other sites More sharing options...
shokinro Posted July 6, 2011 Share Posted July 6, 2011 i know that… the payment method is passed in the language that the order was made and checked-out… but it only passed it because the module was in store as well with its translations… ie… bankwire module (has its own translations in b.o.)… what a i need is to get a php code so its passes “concatenated” the single quote ‘ plus $order.payment plus single quote… so i can get the same code as “{l s=‘bank wire’} The only way I think is1. change the bank wire module to pass in fixed (no translation) "bank wire"2. you translate this by yourself in history.php Link to comment Share on other sites More sharing options...
Camposinhos Posted July 6, 2011 Author Share Posted July 6, 2011 i know that… the payment method is passed in the language that the order was made and checked-out… but it only passed it because the module was in store as well with its translations… ie… bankwire module (has its own translations in b.o.)… what a i need is to get a php code so its passes “concatenated” the single quote ‘ plus $order.payment plus single quote… so i can get the same code as “{l s=‘bank wire’} The only way I think is1. change the bank wire module to pass in fixed (no translation) "bank wire"2. you translate this by yourself in history.php that's what i made with the "{l s='bank wire'}"... i accessed the existing translations in store.thanks anyway... continuing the trial and error methods... maybe i can get it right. Link to comment Share on other sites More sharing options...
Recommended Posts