Hi Guys,
I'd like to first have the currency symbols in a particular order and then I'd then like to replace the symbol with their flag instead. What would be the best way to do this?
I'd like to first have the currency symbols in a particular order and then I'd then like to replace the symbol with their flag instead. What would be the best way to do this?
Would I need to edit currency.php with something like below;
The above code does not work but is going in the right direction? I then add the image url into the symbol left box from the admin side?
Code: Select all
'symbol_left' => $result<img src="['symbol_left']" />,
Ok so after spending ages on this I have now worked out its all done within the currency.tbl file, the code inside this is as follows;
What do I need to change to enable to use an image rather than the symbol. Someone please help me.
Code: Select all
<?php if (count($currencies) > 1) { ?>
<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>
<?php } ?>
Right for anyone who wants to change the currency symbol to flags this is what I done...
for each currency title I put the url of the flags image, eg domain.com/image/uk.png
I then edited the currency.tbl file to the following...
All I need to do now is work out how to order them, which I'm finding pretty difficult, any ideas? I don't understand why the currencies doesn't have a standard sort order like most of the choices on here!
for each currency title I put the url of the flags image, eg domain.com/image/uk.png
I then edited the currency.tbl file to the following...
Code: Select all
<?php if (count($currencies) > 1) { ?>
<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><img src="<?php echo $currency['title']; ?>"/></b></a>
<?php } else { ?>
<a title="<?php echo $currency['title']; ?>"><b><img src="<?php echo $currency['title']; ?>"/></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();"><img src="<?php echo $currency['title']; ?>"/> </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();"><img src="<?php echo $currency['title']; ?>"/></a>
<?php } ?>
<?php } ?>
<?php } ?>
<input type="hidden" name="currency_code" value="" />
<input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
</div>
</form>
<?php } ?>
my url is to big so (admin panel) is saying characters under 3 or 32 so plz help me as soon as possible
Thanks a bunch for the post, just what I was looking for.
Thought I would throw my 2 cents in to improve it a bit:
Change all 4 to
Do this so that when the images are hovered over they don't show the link to the image, instead you will get the ISO code, so instead of "domain.com/image/uk.png" you would get "GBP" when the mouse hovers the image.
Thought I would throw my 2 cents in to improve it a bit:
Change all 4
Code: Select all
<a title="<?php echo $currency['title']; ?>
Code: Select all
<a title="<?php echo $currency['code']; ?>
Who is online
Users browsing this forum: No registered users and 20 guests