How to display Language switcher and currency on header of HAGA template ?

How to display Language switcher and currency on header of HAGA template ? Thanks

13 answers

Profile photo of Sherlock 0.00 $tone November 22, 2012
Public

Hi tonyxyz,

you open the layout file of app\design\frontend\default\jm_haga\layout\page.xm l and insert into the header block

HTML Code:

   <block type="page/html_header" name="header" as="header">

Those child bocks

HTML Code:

                      <block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
	               <block type="directory/currency" as="currency" name="currency" template="directory/currency.phtml"/>

Then open the file of app\design\frontend\default\jm_hagatemplate\page\ html\header.phtml and change this snap of code

HTML Code:

                  <div id="ja-header" class="wrap">
	<div class="main clearfix">
		<h1 id="logo"><a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" style="background-image: url(<?php echo $this->getLogoSrc() ?>);"><?php echo $this->getLogoAlt() ?></a></h1>
		<p class="no-display"><a href="#main"><strong><?php echo $this->__('Skip to Main Content') ?> &raquo;</strong></a></p>
		<!-- BEGIN: HOT LINE -->
		<?php echo $this->getChildHtml('hotline'); ?>
		<!-- END: HOT LINE -->			
		<!-- BEGIN: TOP CART SIDEBAR -->
		<?php echo $this->getChildHtml('top_cart_sidebar'); ?>
		<!-- END: TOP CART SIDEBAR -->
		
	</div>
</div>

To this

HTML Code:

       <div id="ja-header" class="wrap">
	<div class="main clearfix">
		<h1 id="logo"><a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" style="background-image: url(<?php echo $this->getLogoSrc() ?>);"><?php echo $this->getLogoAlt() ?></a></h1>
		<p class="no-display"><a href="#main"><strong><?php echo $this->__('Skip to Main Content') ?> &raquo;</strong></a></p>
		<!-- BEGIN: HOT LINE -->
		<?php echo $this->getChildHtml('hotline'); ?>
		<!-- END: HOT LINE -->	
				
		<!-- BEGIN: TOP CART SIDEBAR -->
		<?php echo $this->getChildHtml('top_cart_sidebar'); ?>
		<!-- END: TOP CART SIDEBAR -->
		<?php echo $this->getChildHtml('currency'); ?>
	</div>
</div>

Hope that helps !

#1
Profile photo of Sherlock 0.00 $tone November 27, 2012
Public

The language switcher works , but the currency does not show up.
Thank you very much !

you should check again your back-end to make sure that you have some Currencies

#3

Hi,
I tried to follow the instructions:
I see the language selector (which I don’t want) and no currency selector.
I then tried to replace the new files with some older ones, but still no change.
Can you help please?
I just need a currency selector.

http://www.designpass.co/store/

Tri

OK I was able to remove the language selector, did the whole thing again (without the language string) and still nothing.
Thanks.

#5
Profile photo of Sherlock 0.00 $tone December 4, 2012
Public

Hi penumbrita,

probably you have only one currency, if that magento would not show the currency switcher for you by default, try the suggestion posted here , if you have only one currency and want it to be showed out then try this
Go to template\directory\currency.phtml and change the code

PHP Code:

<?php if($this->getCurrencyCount()>1): ?>


to

PHP Code:

  <?php if($this->getCurrencyCount()>0): ?>


Hope it helps !

#6

Hi,
sorry to insist, but I am not very good at programming, so before I touch the code I want to be sure it is what I need to do.
Please take a look at the screen shot I am attaching, as I believe there are a few currencies allowed already. What I need it for the user to be able to switch to the one they want (it’s 4 currencies).
Thank you.

#7
Profile photo of Sherlock 0.00 $tone December 5, 2012
Public

Hi penumbrita,

In your back-end you go to System >> Manage Currency >> Rates there your enter the rates for your currencies, take a look at my screenshot.
I hope it helps !

#8

This question is now closed

Written By

Comments