Page 1 of 1

Remove Currency & Language Drop-Downs Altogether v1.4

Posted: Fri Feb 12, 2010 8:08 am
by goddessdeath
I've disabled and uninstalled the currency under Extensions > Modules in OC 1.4 and currency is still showing up at the top. I want to remove both currency and language options altogether from the store end. I've tried searching the forums using "remove+currency" and I'm not finding how to do this other than to disable it in the admin area, which isn't working.

Anyone able to tell me what files to change and what coding needs to be changed? I can modify files if I need to, I just need to know which ones and what to change.

Re: Remove Currency & Language Drop-Downs Altogether v1.4

Posted: Fri Feb 12, 2010 9:40 am
by Qphoria
goddessdeath wrote:I've disabled and uninstalled the currency under Extensions > Modules in OC 1.4 and currency is still showing up at the top. I want to remove both currency and language options altogether from the store end. I've tried searching the forums using "remove+currency" and I'm not finding how to do this other than to disable it in the admin area, which isn't working.

Anyone able to tell me what files to change and what coding needs to be changed? I can modify files if I need to, I just need to know which ones and what to change.
Currency doesn't have a module in 1.4.0. It was merged into the header. The remaining currency module was from your previous version before you upgraded. It is not supported so it should be uninstalled and the files deleted.

To disable the currency selector, you will need to remove it from the header.tpl file

Re: Remove Currency & Language Drop-Downs Altogether v1.4

Posted: Fri Feb 12, 2010 10:06 am
by Artlife
goddessdeath wrote:I've disabled and uninstalled the currency under Extensions > Modules in OC 1.4 and currency is still showing up at the top. I want to remove both currency and language options altogether from the store end. I've tried searching the forums using "remove+currency" and I'm not finding how to do this other than to disable it in the admin area, which isn't working.

Anyone able to tell me what files to change and what coding needs to be changed? I can modify files if I need to, I just need to know which ones and what to change.
I wanted to do the same thing and found it in the header.tpl

I deleted lines 76-111 (Remember to backup your file first and this assumed an unmodified header.tpl)

There's no need to delete the language and currency in the admin, and I'm not sure you would want to as they get tied to orders but i could be wrong about that.

Re: Remove Currency & Language Drop-Downs Altogether v1.4

Posted: Fri Feb 12, 2010 10:11 am
by goddessdeath
Okay, so just to make sure I'm removing the right thing, I just take this out:

Code: Select all

<li><a href="<?php echo $language; ?>"><?php echo $text_language; ?></a></li>
<li><a href="<?php echo $currency; ?>"><?php echo $text_currency; ?></a></li>
of the header.tpl file in admin\view\template\common. Right?

I just don't want to mess something up totally.

Thanks!

Re: Remove Currency & Language Drop-Downs Altogether v1.4

Posted: Fri Feb 12, 2010 10:56 am
by Artlife
goddessdeath wrote:Okay, so just to make sure I'm removing the right thing, I just take this out:

Code: Select all

<li><a href="<?php echo $language; ?>"><?php echo $text_language; ?></a></li>
<li><a href="<?php echo $currency; ?>"><?php echo $text_currency; ?></a></li>
of the header.tpl file in admin\view\template\common. Right?

I just don't want to mess something up totally.

Thanks!
no.. line 76 through line 111. If you aren't using it, get Notepad++, then you can see the line numbers.
and make a backup copy of your file so if you make a mistake you can put the good one back.

Code: Select all

<?php if ($currencies) { ?>
        <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="currency_form">
          <div class="switcher">
            <?php foreach ($currencies as $currency) { ?>
            <?php if ($currency['code'] == $currency_code) { ?>
            <div class="selected"><a><?php echo $currency['title']; ?></a></div>
            <?php } ?>
            <?php } ?>
            <div class="option">
              <?php foreach ($currencies as $currency) { ?>
              <a onclick="$('input[name=\'currency_code\']').attr('value', '<?php echo $currency['code']; ?>'); $('#currency_form').submit();"><?php echo $currency['title']; ?></a>
              <?php } ?>
            </div>
          </div>
          <input type="hidden" name="currency_code" value="" />
          <input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
        </form>
        <?php } ?>
        <?php if ($languages) { ?>
        <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="language_form">
          <div class="switcher">
            <?php foreach ($languages as $language) { ?>
            <?php if ($language['code'] == $language_code) { ?>
            <div class="selected"><a><img src="image/flags/<?php echo $language['image']; ?>" alt="<?php echo $language['name']; ?>" />&nbsp;&nbsp;<?php echo $language['name']; ?></a></div>
            <?php } ?>
            <?php } ?>
            <div class="option">
              <?php foreach ($languages as $language) { ?>
              <a onclick="$('input[name=\'language_code\']').attr('value', '<?php echo $language['code']; ?>'); $('#language_form').submit();"><img src="image/flags/<?php echo $language['image']; ?>" alt="<?php echo $language['name']; ?>" />&nbsp;&nbsp;<?php echo $language['name']; ?></a>
              <?php } ?>
            </div>
          </div>
          <input type="hidden" name="language_code" value="" />
          <input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
        </form>
        <?php } ?>
that's what I deleted, it's basically the two dropdown forms.

Re: Remove Currency & Language Drop-Downs Altogether v1.4

Posted: Wed Feb 17, 2010 1:41 am
by gartheman
Artlife wrote: I wanted to do the same thing and found it in the header.tpl

I deleted lines 76-111 (Remember to backup your file first and this assumed an unmodified header.tpl)

There's no need to delete the language and currency in the admin, and I'm not sure you would want to as they get tied to orders but i could be wrong about that.
which header file is this, i can't find that code you refer to? sorry, only got opencart this week, so much to learn!

Re: Remove Currency & Language Drop-Downs Altogether v1.4

Posted: Wed Feb 17, 2010 1:48 am
by gartheman
never mind, i found the code in the header file at \catalog\view\theme\default\template\common. removing it worked a treat.

Re: Remove Currency & Language Drop-Downs Altogether v1.4

Posted: Thu Feb 18, 2010 9:15 am
by Artlife
gartheman wrote:never mind, i found the code in the header file at \catalog\view\theme\default\template\common. removing it worked a treat.
;)

Re: Remove Currency & Language Drop-Downs Altogether v1.4

Posted: Mon Nov 21, 2011 7:09 pm
by lemonie
Hi

I am trying to do this in the current version and cannot find the code listed above ?

Re: Remove Currency & Language Drop-Downs Altogether v1.4

Posted: Thu Dec 22, 2011 2:52 am
by DouglasTPA
Hello, I was trying to remove the code from the display also.

rather then removing the code I modified the CSS for

Code: Select all

#currency {
	width: 75px;
	position: absolute;
	top: 15px;
	left: 425px;
	color: #999;
	line-height: 17px;
	display:none;
}
By adding the display: none; the user doesn't have the option. This solved it for me.

Re: Remove Currency & Language Drop-Downs Altogether v1.4

Posted: Thu Dec 22, 2011 4:06 am
by rph
That's not necessary in 1.5.x. OpenCart will only display the language/currency selectors if you have multiple active ones.

Re: Remove Currency & Language Drop-Downs Altogether v1.4

Posted: Mon Jan 07, 2013 4:34 am
by regd87
How do I DE-select multiple currency? I only see the option for selecting default currencys

Re: Remove Currency & Language Drop-Downs Altogether v1.4

Posted: Tue Mar 12, 2013 2:51 pm
by John2810
Hi, just stumbled upon this.

For v1.5.4, go to admin->System->Localisation->Currencies

From there, click on the edit link for GBP and EURO and disable them.

That removed the currency for me at the top.

Re: Remove Currency & Language Drop-Downs Altogether v1.4

Posted: Sat Jul 05, 2014 4:19 pm
by zuby
hide or remove manually
go into this directory in your open cart

public_html/catalog/view/theme/yourtheme/template/common/header.tpl
find the code bellow and remove or comment

All done

<div class="pull-right language-currency ">
<span class="currency ">
<?php echo $currency; ?>
</span>
<span class="language">
<?php echo $language; ?>
</span>
</div>


Comment if you need more help

Re: Remove Currency & Language Drop-Downs Altogether v1.4

Posted: Sun Apr 12, 2020 3:13 pm
by kingadjon
John2810 wrote:
Tue Mar 12, 2013 2:51 pm
Hi, just stumbled upon this.

For v1.5.4, go to admin->System->Localisation->Currencies

From there, click on the edit link for GBP and EURO and disable them.

That removed the currency for me at the top.
This solution worked for me without having to change the code and seems a more elegant solution in case one were to decide to use this feature later.

v. 3.0.3.2

Thanks!