Jump to content

Hiding 1 currency from currency selector Prestashop 1.7


Dhaerow8

Recommended Posts

Can someone advise how to hide currency with ID 4 from currency selector.
This is the my code from ps_currencyselector.tpl.

Btw. I need the currency to be there, but I want to hide it from selector.

Thank you in advance

<div class="popup-content" style="min-width: 160px!important;">
        <div class="row">
            
            <div class="col-xs-12" style="width: 35%;">
                
                <div class="currency-selector">
                    <span>{l s='Currency:' d='Shop.Theme.Global'}</span>
                    <ul class="link">
                        {foreach from=$currencies item=currency}
                                      
                          
                            <li {if $currency.current} class="current" {/if}>

                                  <a title="{$currency.name}" rel="nofollow" href="{$currency.url}" class="dropdown-item-currency">{$currency.iso_code}</a>
                            </li>
                        
                        
                          {/foreach}
                    </ul>
                </div>
            </div>
        </div>
    </div>

Edited by Dhaerow8
additional info (see edit history)
Link to comment
Share on other sites

Change this part:

{foreach from=$currencies item=currency}
	<li {if $currency.current} class="current" {/if}>
		<a title="{$currency.name}" rel="nofollow" href="{$currency.url}" class="dropdown-item-currency">{$currency.iso_code}</a>
	</li>
{/foreach}
                        
                        

to this:

{foreach from=$currencies item=currency}
	{if $currency.id != 4}
	<li {if $currency.current} class="current" {/if}>
		<a title="{$currency.name}" rel="nofollow" href="{$currency.url}" class="dropdown-item-currency">{$currency.iso_code}</a>
	</li>
	{/if}
{/foreach}

 

  • Like 1
Link to comment
Share on other sites

  On 11/6/2020 at 2:07 PM, endriu107 said:

Change this part:

{foreach from=$currencies item=currency}
	<li {if $currency.current} class="current" {/if}>
		<a title="{$currency.name}" rel="nofollow" href="{$currency.url}" class="dropdown-item-currency">{$currency.iso_code}</a>
	</li>
{/foreach}
                        
                        

to this:

{foreach from=$currencies item=currency}
	{if $currency.id != 4}
	<li {if $currency.current} class="current" {/if}>
		<a title="{$currency.name}" rel="nofollow" href="{$currency.url}" class="dropdown-item-currency">{$currency.iso_code}</a>
	</li>
	{/if}
{/foreach}

 

Expand  

Thank you. Good man :)

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...