ssneck Posted June 7, 2016 Share Posted June 7, 2016 (edited) Hi! Please help me to hide certain currency from currency block module. Picture is attached.The currency must be activated in BackOffice because it is used by local payment gateway, but in same time this currency (with id=4) must be hiden on the FrontOffice becaues it doesn't make sense for buyers. So I cannot just disable or delete this currency. I beleive I have to modify blockcurrencies.tpl in currency module to not allow to appear this currency on the site. For example: {IF currency.id=4}{hide-this-row-from-block} {/if}(I hope you understand what i mean )Can anyone help me, how to modify .tpl?Thanks in advance. Edited June 7, 2016 by ssneck (see edit history) Link to comment Share on other sites More sharing options...
ssneck Posted June 7, 2016 Author Share Posted June 7, 2016 this is my blockcurrencies.tpl <!-- Block currencies module --> <dl id="currencies_block_top" class="{if isset($istopbar) && $istopbar}{if isset($currencies_position) && $currencies_position} pull-right{else} pull-left{/if}{/if} dropdown_wrap"> <dt class="dropdown_tri"> <div class="dropdown_tri_inner"> {if $display_sign!=1}{$blockcurrencies_sign} {/if}{if $display_sign!=2}{foreach from=$currencies key=k item=f_currency}{if $cookie->id_currency == $f_currency.id_currency}{$f_currency.iso_code}{/if}{/foreach}{/if}{if count($currencies) > 1}<b></b>{/if} </div> </dt> {if count($currencies) > 1} <dd class="dropdown_list"> <form id="setCurrency" action="{$request_uri}" method="post"> <ul> {foreach from=$currencies key=k item=f_currency} {if $cookie->id_currency != $f_currency.id_currency} <li> <a href="javascript:setCurrency({$f_currency.id_currency});" title="{$f_currency.name}" rel="nofollow">{if $display_sign!=1}{$f_currency.sign} {/if}{if $display_sign!=2}{$f_currency.iso_code}{/if}</a> </li> {/if} {/foreach} </ul> <input type="hidden" name="id_currency" id="id_currency" value=""/> <input type="hidden" name="SubmitCurrency" value="" /> </form> </dd> {/if} </dl> <!-- /Block currencies module --> Link to comment Share on other sites More sharing options...
true0r Posted June 7, 2016 Share Posted June 7, 2016 (edited) Hi! {if $f_currency.id_currency == 4 } {* skip this iteration *} {continue} {/if} You should paste the code above in file themes/default-bootstrap/modules/blockcurrencies/blockcurrencies.tpl after <ul id="first-currencies" class="currencies_ul toogle_content"> {foreach from=$currencies key=k item=f_currency} Solution works in PrestaShop 1.6.1.4 Edited June 7, 2016 by true0r (see edit history) Link to comment Share on other sites More sharing options...
shokinro Posted June 8, 2016 Share Posted June 8, 2016 you only need to change one line From {if $cookie->id_currency != $f_currency.id_currency} To {if $cookie->id_currency != $f_currency.id_currency && $f_currency.id_currency != 4} 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