10rous Posted October 17, 2013 Share Posted October 17, 2013 Hi there I have a prestashop site in two languages, italian and english I can translate everything at the back end but I can't get it to work on a tpl I've modified Can anyone help with this thanks a lot http://www.curiosandoingiardino.it/it/shoponline <script type="text/javascript"> $(document).ready(function() { $('.desplegable').click(function() { $(this).next('ul').slideToggle(); }) }) </script> <div class="content"> <div id="imagen_principal"> <img src="{$img_dir}shoponline.jpg" /> <p>{l s='TERMS AND CONDITIONS'} : <a href="#">{l s='SALES'}</a>· <a href="#">{l s='SHIPMENT'}</a></p> </div> <div class="dklampion"> <h2>{l s='Negozio Online'}</h2> <ul id="categorias"> {assign var='i' value=0} {foreach from=$categorias key=indice item=categoria} <li> {if $i lt 4} <a href="{$categoria.id}-{$categoria.link}" class="especiales">{$categoria.name}</a> {assign var='i' value=$i +1} {elseif $categoria.hijos eq ''} {if $i eq 4}<div style="margin-top: 20px;"></div>{assign var='i' value=$i +1}{/if} <a href="{$categoria.id}-{$categoria.link}">{$categoria.name}</a> {else} <span class="desplegable">{$categoria.name}</span> <ul class="oculto"> {foreach from=$categoria.hijos item=subcategoria} <li> <a href="{$subcategoria.id}-{$subcategoria.link}">· {$subcategoria.name}</a> </li> {/foreach} </ul> {/if} </li> {/foreach} </ul> <p style="font-size:16px;"><br /><br />categoria e ogetti in aggiornamento periodico</p> </div> </div> Link to comment Share on other sites More sharing options...
SmartDataSoft Posted October 17, 2013 Share Posted October 17, 2013 Is this template is from any module or theme. if you are usign theme file then got to translation->front office->giardino and select your language and you will find the text, i think then translate and check if not show, regenerate the cache file. 1 Link to comment Share on other sites More sharing options...
vekia Posted October 17, 2013 Share Posted October 17, 2013 hello this is a part of module? or it's a part of theme? what part of code doesnt work (translations) ? 1 Link to comment Share on other sites More sharing options...
10rous Posted October 17, 2013 Author Share Posted October 17, 2013 thanks vekia and smartdatasoft it's part of a custom theme indeed if I do translate categories they are displayed only in english at the front end when entering the category pages transaltion work just fine then if I go to translations I get the famous issue max_input_vars and I can't fix it via php.ini or htacces how can I access the translation files via ftp? thanks a lot Front Office translations (Language: Italiano (Italian), Theme: giardino) Warning, your PHP configuration limits the maximum number of fields to post in a form: 1000 for max_input_vars.Please ask your hosting provider to increase the this limit to 1320 at least or edit the translation file manually. Link to comment Share on other sites More sharing options...
SmartDataSoft Posted October 17, 2013 Share Posted October 17, 2013 hello, if it is not possible to increase the max_input_vars not possible for you to increase the value then follow this instruction which is possible for manually translate. i think it will guide you if you are able to do manually translation http://smartdatasoft.com/prestashop/documentation/sellya/faq.htm#how_to_and_faq_installed_module_by_prestashop Link to comment Share on other sites More sharing options...
vekia Posted October 17, 2013 Share Posted October 17, 2013 in this case you have to edit the php settings. hope that you've got possibility. read this: max input vars in prestashop where you've got hosting? Link to comment Share on other sites More sharing options...
10rous Posted October 17, 2013 Author Share Posted October 17, 2013 hello, if it is not possible to increase the max_input_vars not possible for you to increase the value then follow this instruction which is possible for manually translate. i think it will guide you if you are able to do manually translation http://smartdatasoft.com/prestashop/documentation/sellya/faq.htm#how_to_and_faq_installed_module_by_prestashop I'll try and edit category translations manually Link to comment Share on other sites More sharing options...
10rous Posted October 17, 2013 Author Share Posted October 17, 2013 hello, if it is not possible to increase the max_input_vars not possible for you to increase the value then follow this instruction which is possible for manually translate. i think it will guide you if you are able to do manually translation http://smartdatasoft.com/prestashop/documentation/sellya/faq.htm#how_to_and_faq_installed_module_by_prestashop I don't understand what can I change on the php nag files, I don't see how it affects that tpl Link to comment Share on other sites More sharing options...
El Patron Posted October 17, 2013 Share Posted October 17, 2013 if possible, create a localhost running either your shop or a native ps image on your computer...then you can (if needed) change your php.ini...xlate the languages and then simply upload to your online shop. Link to comment Share on other sites More sharing options...
10rous Posted October 17, 2013 Author Share Posted October 17, 2013 in this case you have to edit the php settings. hope that you've got possibility. read this: max input vars in prestashop where you've got hosting? aruba.it Link to comment Share on other sites More sharing options...
vekia Posted October 17, 2013 Share Posted October 17, 2013 hello take a look: Personalizzazione del file PHP.INILo strumento è utile per personalizzare e quindi adattare in base agli applicativi da utilizzare il file PHP.INI (un file di configurazione in grado di controllare i diversi aspetti del comportamento del linguaggio php). L'apposito pulsante apre una finestra che consente la selezione del PHP.INI da adattare a secondo dei CMS da installare nel proprio spazio web. (Funzione disponibile solo per chi utilizza il php5). enjoy Link to comment Share on other sites More sharing options...
El Patron Posted October 17, 2013 Share Posted October 17, 2013 are you using php release 5.3 or greater? if so you can do this via .htaccess (I would put in admin directory). .htaccess php_value max_input_vars 2000 2000 is an example note hosting companies may override this... Link to comment Share on other sites More sharing options...
10rous Posted October 17, 2013 Author Share Posted October 17, 2013 el patron I've already tried that and it didn't work out vekia, I think that's the solution, thanks what I don't understand is why the transation works in the category pages and not with that particular tpl Category list page (tpl above): http://www.curiosandoingiardino.it/en/shoponline as you can see it displays furniture in english (the other categories are in italian in both languages) Category page works perfectly well: http://www.curiosandoingiardino.it/en/12-furniture (english) http://www.curiosandoingiardino.it/it/12-arredi (italian) Link to comment Share on other sites More sharing options...
10rous Posted October 22, 2013 Author Share Posted October 22, 2013 figured out the max_input_vars at aruba.it by changing php version to PHP5.2.x buy i still can't get the categories translated, evrything else works fine as you can see I got variables translated but not what is inside foreach first category is the only one translated at the back office (furniture/arredi) it only dispplays the english version, the other ones ara in italian in both languages category pages work fine http://www.curiosandoingiardino.it/it/shoponline http://www.curiosandoingiardino.it/en/shoponline http://www.curiosandoingiardino.it/it/12-arredi can anyone help with this? here's the foreach {foreach from=$categorias item=categoria}<li> <a href="{$categoria.id}-{$categoria.link}">{$categoria.name}</a> {/foreach} Link to comment Share on other sites More sharing options...
vekia Posted October 22, 2013 Share Posted October 22, 2013 what you've got in $categorias variable? i suppose that array of categories. if so, have you got these categories traslations? in catalog > categories ? Link to comment Share on other sites More sharing options...
10rous Posted October 22, 2013 Author Share Posted October 22, 2013 here's the controller file class ShoponlineControllerCore extends FrontController { public $php_self = 'shoponline'; /** * Assign template vars related to page content * @see FrontController::initContent() */ public function initContent() { parent::initContent(); // Cargamos las categorías $categorias = Category::getCategories(); unset($categorias[0]); unset($categorias[1]); $categorias_final = array(); foreach ($categorias as $key => $categoria) { foreach ($categoria as $key2 => $value) { if ($value['infos']['id_parent'] == 2) { // Categoria root $categorias_final[$value['infos']['id_category']]['id'] = $value['infos']['id_category']; $categorias_final[$value['infos']['id_category']]['link'] = $value['infos']['link_rewrite']; $categorias_final[$value['infos']['id_category']]['name'] = $value['infos']['name']; $categorias_final[$value['infos']['id_category']]['hijos'] = ''; } else { $categorias_final[$value['infos']['id_parent']]['hijos'][$value['infos']['id_category']]['id'] = $value['infos']['id_category']; $categorias_final[$value['infos']['id_parent']]['hijos'][$value['infos']['id_category']]['link'] = $value['infos']['link_rewrite']; $categorias_final[$value['infos']['id_parent']]['hijos'][$value['infos']['id_category']]['name'] = $value['infos']['name']; } } } /*echo "<pre>"; print_r($categorias_final); echo "</pre>";*/ $this->context->smarty->assign('categorias', $categorias_final); $this->setTemplate(_PS_THEME_DIR_.'shoponline.tpl'); } } Link to comment Share on other sites More sharing options...
10rous Posted October 22, 2013 Author Share Posted October 22, 2013 what you've got in $categorias variable? i suppose that array of categories. if so, have you got these categories traslations? in catalog > categories ? yes I do Link to comment Share on other sites More sharing options...
10rous Posted October 22, 2013 Author Share Posted October 22, 2013 what you've got in $categorias variable? i suppose that array of categories. if so, have you got these categories traslations? in catalog > categories ? Link to comment Share on other sites More sharing options...
Recommended Posts