Jump to content

[carrier problem] how can i do that i could change carrier name in BO in all languages I have.


Recommended Posts

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

  • 4 weeks later...
  • 2 weeks later...

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.

  • Like 1
Link to comment
Share on other sites

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

  • 4 months later...

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...