alex298 Posted September 10, 2006 Posted September 10, 2006 Hello, The whole Currencies Box with header and box border will be shown when I copy the following curencies code to the header of osCommerce website: include(DIR_WS_BOXES . 'currencies.php'); Actually I only want to display the Currencies Drop Down Box to the header. Could some experts here advise how to do that? I tried to edit the currencies.php, but no luck. Thanks. Alex Alex
Guest Posted September 10, 2006 Posted September 10, 2006 Actually I only want to display the Currencies Drop Down Box to the header. Could some experts here advise how to do that? I tried to edit the currencies.php, but no luck. Thanks. Alex Paste this in your header.php (you might have to create its own cell, but it works ! <table width="200" cellpadding="3"> <?php if (isset($currencies) && is_object($currencies)) { ?> <tr> <td> <?php reset($currencies->currencies); $currencies_array = array(); while (list($key, $value) = each($currencies->currencies)) { $currencies_array[] = array('id' => $key, 'text' => $value['title']); } $hidden_get_variables = ''; reset($HTTP_GET_VARS); while (list($key, $value) = each($HTTP_GET_VARS)) { if ( ($key != 'currency') && ($key != tep_session_name()) && ($key != 'x') && ($key != 'y') ) { $hidden_get_variables .= tep_draw_hidden_field($key, $value); } } echo tep_draw_form('currencies', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get'); echo tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onChange="this.form.submit();" style="width: 100%"') . $hidden_get_variables . tep_hide_session_id(); ?> </td> </tr> <?php } ?> </table> tested an approved :-)
alex298 Posted September 11, 2006 Author Posted September 11, 2006 Dear pixclinic, Thanks for your kind assistance! It works perfectly! You are really an expert. Alex
Guest Posted September 11, 2006 Posted September 11, 2006 Dear pixclinic, Thanks for your kind assistance! It works perfectly! You are really an expert. you are welcome I just noticed that the real infobox has a feature that hides the menu when we are on the checkouts page, preventing people to change currencies during checkout shipping, payment and confirmation. This is not implemented in what I posted. Let me know if that bothers you, I can make the addition.
ddaanniieelluk Posted April 21, 2007 Posted April 21, 2007 you are welcome I just noticed that the real infobox has a feature that hides the menu when we are on the checkouts page, preventing people to change currencies during checkout shipping, payment and confirmation. This is not implemented in what I posted. Let me know if that bothers you, I can make the addition. Thanks! You solved my problem too. Much appreciated, i've been looking fr this for ages.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.