thesiege84 Posted January 24, 2009 Posted January 24, 2009 Hi all, I am trying to add a currency box to my website in the includes/header.php file however when i try and add the code below when you click on the drop down box and change it, it does not load the new prices. In fact nothing much happens at all. Could someone spare a couple of min to look at the code i'm trying to add please. <? // CURRENCIES echo tep_draw_form('currencies', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get'); 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_pull_down_menu('currency', $currencies_array, $currency, 'onChange="this.form.submit(); style="width: 99px; background-color: #727272; font-size: 9px; color: #FFFFFF;"') . $hidden_get_variables . tep_hide_session_id(); echo '</form>'; ?>
L!mit Posted January 24, 2009 Posted January 24, 2009 Hi - Backup and try the following . Basically you just need to add a quote behind of your style tag. echo tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onChange="this.form.submit();" style="width: 99px; background-color: #727272; font-size: 9px; color: #FFFFFF;"') . $hidden_get_variables . tep_hide_session_id(); <? if (isset($currencies) && is_object($currencies)) { 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: 99px; background-color: #727272; font-size: 9px; color: #FFFFFF;"') . $hidden_get_variables . tep_hide_session_id(); echo'</form>'; } ?>
thesiege84 Posted January 24, 2009 Author Posted January 24, 2009 Hi, Thanks for your response however it doesn't seem to have made a difference. If it helps in anyway here is the url of the store: http://tinyurl.com/avo6wh Thanks again, anymore suggestions?
thesiege84 Posted January 25, 2009 Author Posted January 25, 2009 Hi, Thanks for your response however it doesn't seem to have made a difference. If it helps in anyway here is the url of the store: http://tinyurl.com/avo6wh Thanks again, anymore suggestions? I take that back.... like a noob i edited a previous version and uploaded a different version..... Works like a dream. Thanks mate!!!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.