Post by goddessdeath » Fri Feb 12, 2010 8:08 am

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.

Newbie

Posts

Joined
Fri Jan 29, 2010 7:14 am

Post by Qphoria » Fri Feb 12, 2010 9:40 am

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

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Artlife » Fri Feb 12, 2010 10:06 am

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.

New member

Posts

Joined
Tue Feb 02, 2010 11:41 am

Post by goddessdeath » Fri Feb 12, 2010 10:11 am

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!

Newbie

Posts

Joined
Fri Jan 29, 2010 7:14 am

Post by Artlife » Fri Feb 12, 2010 10:56 am

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.

New member

Posts

Joined
Tue Feb 02, 2010 11:41 am

Post by gartheman » Wed Feb 17, 2010 1:41 am

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!

New member

Posts

Joined
Tue Feb 16, 2010 5:12 pm

Post by gartheman » Wed Feb 17, 2010 1:48 am

never mind, i found the code in the header file at \catalog\view\theme\default\template\common. removing it worked a treat.

New member

Posts

Joined
Tue Feb 16, 2010 5:12 pm

Post by Artlife » Thu Feb 18, 2010 9:15 am

gartheman wrote:never mind, i found the code in the header file at \catalog\view\theme\default\template\common. removing it worked a treat.
;)

New member

Posts

Joined
Tue Feb 02, 2010 11:41 am

Post by lemonie » Mon Nov 21, 2011 7:09 pm

Hi

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

New member

Posts

Joined
Fri Nov 18, 2011 8:28 pm

Post by DouglasTPA » Thu Dec 22, 2011 2:52 am

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.

Newbie

Posts

Joined
Thu Dec 22, 2011 2:48 am

Post by rph » Thu Dec 22, 2011 4:06 am

That's not necessary in 1.5.x. OpenCart will only display the language/currency selectors if you have multiple active ones.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by regd87 » Mon Jan 07, 2013 4:34 am

How do I DE-select multiple currency? I only see the option for selecting default currencys

Newbie

Posts

Joined
Mon Jan 07, 2013 4:32 am

Post by John2810 » 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.

New member

Posts

Joined
Tue Feb 19, 2013 5:37 pm

Post by zuby » Sat Jul 05, 2014 4:19 pm

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

Newbie

Posts

Joined
Sat Jul 05, 2014 4:17 pm

Post by kingadjon » Sun Apr 12, 2020 3:13 pm

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!

Newbie

Posts

Joined
Fri Apr 10, 2020 10:53 am
Who is online

Users browsing this forum: No registered users and 54 guests