Has anyone got a dropbox currency option.
I use multiple currencies and hate the look of them all over the top .
Would like to make it look neeter with a dropbox.
Thanks in advance.
http://www.creativedecals.co.uk
I use multiple currencies and hate the look of them all over the top .
Would like to make it look neeter with a dropbox.
Thanks in advance.
http://www.creativedecals.co.uk
Last edited by cabte on Mon Mar 19, 2012 4:33 pm, edited 1 time in total.
www.firststopdecals.co.uk
www.creativedecals.co.uk
www.jujucats.co.uk
1. EDIT: catalog/view/theme/default/template/common/header.tpl
2. FIND:
3. REPLACE WITH:
2. FIND:
Code: Select all
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
<div id="currency"><?php echo $text_currency; ?><br />
<?php foreach ($currencies as $currency) { ?>
<?php if ($currency['code'] == $currency_code) { ?>
<?php if ($currency['symbol_left']) { ?>
<a title="<?php echo $currency['title']; ?>"><b><?php echo $currency['symbol_left']; ?></b></a>
<?php } else { ?>
<a title="<?php echo $currency['title']; ?>"><b><?php echo $currency['symbol_right']; ?></b></a>
<?php } ?>
<?php } else { ?>
<?php if ($currency['symbol_left']) { ?>
<a title="<?php echo $currency['title']; ?>" onclick="$('input[name=\'currency_code\']').attr('value', '<?php echo $currency['code']; ?>').submit(); $(this).parent().parent().submit();"><?php echo $currency['symbol_left']; ?></a>
<?php } else { ?>
<a title="<?php echo $currency['title']; ?>" onclick="$('input[name=\'currency_code\']').attr('value', '<?php echo $currency['code']; ?>').submit(); $(this).parent().parent().submit();"><?php echo $currency['symbol_right']; ?></a>
<?php } ?>
<?php } ?>
<?php } ?>
<input type="hidden" name="currency_code" value="" />
<input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
</div>
</form>
Code: Select all
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
<div id="currency"><?php echo $text_currency; ?><br />
<select onchange="$('input[name=\'currency_code\']').attr('value', this.value); $(this).parent().parent().submit();">
<?php foreach ($currencies as $currency) { ?>
<?php if ($currency['code'] == $currency_code) { ?>
<option value="<?php echo $currency['code']; ?>" selected="selected"><?php echo $currency['title']; ?></option>
<?php } else { ?>
<option value="<?php echo $currency['code']; ?>"><?php echo $currency['title']; ?></option>
<?php } ?>
<?php } ?>
</select>
<input type="hidden" name="currency_code" value="<?php echo $currency_code; ?>" />
<input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
</div>
</form>
You can also make it as list, which will allow for far more option, on how it will appear. With CSS there are plenty ready options for menus that you can alter any way. I've just completed my own, you can check how it looks here - http://www.japantea.org/shopIcebox wrote:Thank you very much, Qphoria. I changed my code to that, and it worked perfectly. Much appreciated.
And code to make a working list, here i'm also adding flags to each currency:
Code: Select all
<?php if (count($currencies) > 1) { ?>
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="currency_form">
<div id="currency">
<?php foreach ($currencies as $currency) { ?>
<?php if ($currency['code'] == $currency_code) { ?>
<?php } ?>
<?php } ?>
<ul id="cswitch"><li><a><?php echo $text_currency; ?></a><ul>
<?php foreach ($currencies as $currency) { ?>
<li><a onclick="$('input[name=\'currency_code\']').attr('value', '<?php echo $currency['code']; ?>'); $('#currency_form').submit();"><img class="csswitch_image" src="catalog/view/theme/...../....../flags/<?php echo $currency['code']; ?>.png" title="<?php echo $currency['title']; ?>"/><?php echo $currency['code']; ?></a></li>
<?php } ?>
</ul></li></ul>
</div>
<input type="hidden" name="currency_code" value="" />
<input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
</form>
<?php } ?>
only just noticed the replies sorry.
Thanks for the info everyone.
carl
Thanks for the info everyone.
carl
www.firststopdecals.co.uk
www.creativedecals.co.uk
www.jujucats.co.uk
Iv tried both codes and it wont work for me im afraid
could it have something to do with the template im using?
could it have something to do with the template im using?
www.firststopdecals.co.uk
www.creativedecals.co.uk
www.jujucats.co.uk
Sorry guys its me it would help if i was trying to code the correct theme.plonker
works great
works great
www.firststopdecals.co.uk
www.creativedecals.co.uk
www.jujucats.co.uk
Who is online
Users browsing this forum: No registered users and 41 guests