Jevgen Posted November 5, 2011 Share Posted November 5, 2011 How can i do that i could change carrier name in BO in all languages I have. By default I can set only name in one language. I have PS 1.3.6.0 Link to comment Share on other sites More sharing options...
Jevgen Posted November 5, 2011 Author Share Posted November 5, 2011 I have following code: <label>'.$this->l('Company:').' </label> <div class="margin-form"> <input type="text" size="25" name="name" value="'.htmlentities($this->getFieldValue($obj, 'name'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup> <span class="hint" name="help_box">'.$this->l('Allowed characters: letters, spaces and').' ().-<span class="hint-pointer"> </span></span> <p class="clear">'.$this->l('Carrier name displayed during checkout').'<br />'.$this->l('With a value of 0, the carrier name will be replaced by the shop name').'</p> </div> <label>'.$this->l('Logo:').' </label> <div class="margin-form"> <input type="file" name="logo" /> <p>'.$this->l('Upload logo from your computer').' (.gif, .jpg, .jpeg '.$this->l('or').' .png)</p> </div> <label>'.$this->l('Transit time:').' </label> <div class="margin-form">'; foreach ($this->_languages as $language) echo ' <div id="delay_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;"> <input type="text" size="41" maxlength="128" name="delay_'.$language['id_lang'].'" value="'.htmlentities($this->getFieldValue($obj, 'delay', intval($language['id_lang'])), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup> </div>'; $this->displayFlags($this->_languages, $this->_defaultFormLanguage, 'delay', 'delay'); echo ' <p style="clear: both">'.$this->l('Time taken for product delivery; displayed during checkout').'</p> </div> <label>'.$this->l('URL:').' </label> <div class="margin-form"> <input type="text" size="40" name="url" value="'.htmlentities($this->getFieldValue($obj, 'url'), ENT_COMPAT, 'UTF-8').'" /> <p class="clear">'.$this->l('URL for the tracking number; type \'@\' where the tracking number will appear').'</p> </div> Link to comment Share on other sites More sharing options...
Jevgen Posted November 5, 2011 Author Share Posted November 5, 2011 anyone ? Link to comment Share on other sites More sharing options...
Jevgen Posted November 6, 2011 Author Share Posted November 6, 2011 ay ay ay please =(((((((((((((((((((((( Link to comment Share on other sites More sharing options...
Jevgen Posted November 30, 2011 Author Share Posted November 30, 2011 ау ау ау ! Link to comment Share on other sites More sharing options...
Jevgen Posted December 9, 2011 Author Share Posted December 9, 2011 help. please ! Link to comment Share on other sites More sharing options...
bellini13 Posted December 9, 2011 Share Posted December 9, 2011 i looked at this alittle and I don't believe it is possible. you can try to change the template file order-carrier.tpl, so that it would translate the name. in the template the name is displayed by using the $carrier.name variable. <td class="carrier_name"> <label for="id_carrier{$carrier.id_carrier|intval}"> {if $carrier.img}<img src="{$carrier.img|escape:'htmlall':'UTF-8'}" alt="{$carrier.name|escape:'htmlall':'UTF-8'}" />{else}{$carrier.name|escape:'htmlall':'UTF-8'}{/if} </label> </td> a better way to do this would be in the controller class, override the controller to translate the value before it's stored in the smarty engine for display purposes. 1 Link to comment Share on other sites More sharing options...
Jevgen Posted December 10, 2011 Author Share Posted December 10, 2011 i looked at this alittle and I don't believe it is possible. you can try to change the template file order-carrier.tpl, so that it would translate the name. in the template the name is displayed by using the $carrier.name variable. <td class="carrier_name"> <label for="id_carrier{$carrier.id_carrier|intval}"> {if $carrier.img}<img src="{$carrier.img|escape:'htmlall':'UTF-8'}" alt="{$carrier.name|escape:'htmlall':'UTF-8'}" />{else}{$carrier.name|escape:'htmlall':'UTF-8'}{/if} </label> </td> a better way to do this would be in the controller class, override the controller to translate the value before it's stored in the smarty engine for display purposes. hmmm very sad to hear this ... but i think all can be done ) Link to comment Share on other sites More sharing options...
Jevgen Posted April 22, 2012 Author Share Posted April 22, 2012 Any help ????????????? Please, please Link to comment Share on other sites More sharing options...
bellini13 Posted April 23, 2012 Share Posted April 23, 2012 the carrier name is not localized, you will have to do what i suggested above. 1 Link to comment Share on other sites More sharing options...
Jevgen Posted April 23, 2012 Author Share Posted April 23, 2012 Thank you. I will try it today. Link to comment Share on other sites More sharing options...
Jevgen Posted April 23, 2012 Author Share Posted April 23, 2012 you told that a better way to do this would be in the controller class, override the controller to translate the value before it's stored in the smarty engine for display purposes. how can it be done ? Link to comment Share on other sites More sharing options...
bellini13 Posted April 23, 2012 Share Posted April 23, 2012 if you would like me to do it for you, you can send me a PM and we can discuss the details. I do charge for providing custom solutions like this. otherwise if you are familiar with php coding, you should start reading up on the forum on how to override controllers. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now