Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Hyperlink instead of drop down to change currency?


Recommended Posts

Hi , Can someone pls give me a few pointers as to the code to make the currencies.php a hyperlink (flags are the hyperlinks) and this changes the currency across the site.







are you sure flags are the appropriate representation of currencies ?

Treasurer MFC

Link to comment
Share on other sites

more specifically... flags / with currency symbols on them...US / UK / EURO


right, then you need to extend the currencies class to hold images like the language class.



to display the languages as flags I use this code in the header, you could possibly alter this to reflect the currencies after changing that class.



if (!isset($lng) || (isset($lng) && !is_object($lng))) {

include(DIR_WS_CLASSES . 'language.php');

$lng = new language;



if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {


while (list($key, $value) = each($lng->catalog_languages)) {

if ($language != $value['directory'] ){

$languages_string .= '<td nowrap class="headerNavigation"> | </td>

<td nowrap class="headerNavigation"><a onmouseover="window.status=\'' . $value['name'] . '\'; return true" href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'lng', 'currency', 'zx', 'azx', 'yx', 'action')) . 'lng=' . $key, $request_type) . '">' . tep_image(DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'], $value['name'], ' style="vertical-align: middle" ') . '</a></td>';



echo $languages_string;



Treasurer MFC

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...