maca_eglarest Posted September 17, 2013 Share Posted September 17, 2013 (edited) My theme is warehouse and the way to choose language is iso code button and I wanna change it for country flags. I'm using prestashop 1.5.3.1. The web is http://caprichosdelamancha.com . Thanks for your help. Edited September 17, 2013 by maca_eglarest (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted September 17, 2013 Share Posted September 17, 2013 It highly depends on how the theme handles the language blocks. Since it probably overrides it, go to your theme fodler, modules, blocklanguages and open blocklanguages.tpl. Find the string related to the iso code, it's hard to tell where it is, but it should be something referring to $language.iso_code Change the content of the link to <img src="{$img_lang_dir}{$language.id_lang}.jpg" alt="{$language.iso_code}" width="16" height="11" /> Of course, the image size will depend on your flags icons Link to comment Share on other sites More sharing options...
maca_eglarest Posted September 17, 2013 Author Share Posted September 17, 2013 That file already is wrote so, that's not the way. Thaks for your answer <!-- Block languages module --> {if count($languages) > 1} <div id="languages_block_top"> <div id="countries"> {* @todo fix display current languages, removing the first foreach loop *} {foreach from=$languages key=k item=language name="languages"} {if $language.iso_code == $lang_iso} <p class="selected_language"> <img src="{$img_lang_dir}{$language.id_lang}.jpg" alt="{$language.iso_code}" width="16" height="11" /> </p> {/if} {/foreach} <ul id="first-languages" class="countries_ul"> {foreach from=$languages key=k item=language name="languages"} <li {if $language.iso_code == $lang_iso}class="selected_language"{/if}> {if $language.iso_code != $lang_iso} {assign var=indice_lang value=$language.id_lang} {if isset($lang_rewrite_urls.$indice_lang)} <a href="{$lang_rewrite_urls.$indice_lang|escape:htmlall}" title="{$language.name}"> {else} <a href="{$link->getLanguageLink($language.id_lang)|escape:htmlall}" title="{$language.name}"> {/if} {/if} <img src="{$img_lang_dir}{$language.id_lang}.jpg" alt="{$language.iso_code}" width="16" height="11" /> {if $language.iso_code != $lang_iso} </a> {/if} </li> {/foreach} </ul> </div> </div> <script type="text/javascript"> $(document).ready(function () { $("#countries").mouseover(function(){ $(this).addClass("countries_hover"); $(".countries_ul").addClass("countries_ul_hover"); }); $("#countries").mouseout(function(){ $(this).removeClass("countries_hover"); $(".countries_ul").removeClass("countries_ul_hover"); }); }); </script> {/if} <!-- /Block languages module --> Link to comment Share on other sites More sharing options...
NemoPS Posted September 17, 2013 Share Posted September 17, 2013 That doesn't seem to be the one your theme uses, but rather the original one Link to comment Share on other sites More sharing options...
maca_eglarest Posted September 17, 2013 Author Share Posted September 17, 2013 Oh, sorry. It's my fault. This is the theme code: <!-- Block languages module --> {if count($languages) > 1} <div id="languages_block_top"> <ul id="first-languages" class="countries_ul"> {foreach from=$languages key=k item=language name="languages"} <li> <a {if $language.iso_code == $lang_iso}class="selected"{/if} href="{$link->getLanguageLink($language.id_lang)|escape:htmlall}" title="{$language.name}"> {$language.iso_code} </a> </li> {/foreach} </ul> </div> {/if} <!-- /Block languages module --> Where have I to put the code that you have told me? Link to comment Share on other sites More sharing options...
NemoPS Posted September 17, 2013 Share Posted September 17, 2013 You can use it like this: <!-- Block languages module --> {if count($languages) > 1} <div id="languages_block_top"> <ul id="first-languages" class="countries_ul"> {foreach from=$languages key=k item=language name="languages"} <li> <a {if $language.iso_code == $lang_iso}class="selected"{/if} href="{$link->getLanguageLink($language.id_lang)|escape:htmlall}" title="{$language.name}"> <img src="{$img_lang_dir}{$language.id_lang}.jpg" alt="{$language.iso_code}" width="16" height="11" /> </a> </li> {/foreach} </ul> </div> {/if} <!-- /Block languages module --> Now, I suggest you also add something which slightly makes the selected flag different. For example, you can set the opacity for all LI tags to .5, and to 1 the one for the currently selected language (.selected class) Link to comment Share on other sites More sharing options...
maca_eglarest Posted September 17, 2013 Author Share Posted September 17, 2013 Thank you so much. How can I do this question solved? Link to comment Share on other sites More sharing options...
NemoPS Posted September 17, 2013 Share Posted September 17, 2013 You can do it by editing the first post and clicking 'use full editor' 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