Salvo Posted June 14, 2003 Posted June 14, 2003 Hi all I can't just do it anymore.. can someone help me in getting rid of the infobox for the currencies? $info_box_contents = array(); $info_box_contents[] = array('form' => tep_draw_form('currencies', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get'), 'align' => 'center', 'text' => tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onChange="this.form.submit();" style="width: 100%"') . $hidden_get_variables . tep_hide_session_id()); echo $info_box_contents; What should I do? Thanks
halbert Posted June 15, 2003 Posted June 15, 2003 Just comment it out in the includes/column_right.php file. It's near the end: if (substr(basename($PHP_SELF), 0, 8) != 'checkout') { include(DIR_WS_BOXES . 'languages.php'); // include(DIR_WS_BOXES . 'currencies.php'); } Good luck! -al
Salvo Posted June 15, 2003 Author Posted June 15, 2003 Thanks Halbert But it is not what I want to... I still whant the currencies option, but not in the box because I like to place it in the HEADER... Thanks I have taken out the languages box and others but currencies it is a bit hard for my skills... Anybody can help? Thanks
Guest Posted June 15, 2003 Posted June 15, 2003 put echo tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onChange="this.form.submit();" style="width: 100%"') . $hidden_get_variables . tep_hide_session_id(); in your header
Salvo Posted June 15, 2003 Author Posted June 15, 2003 Thanks Meltus, Could you post the full code to be put in the header as I can't make it work? Thanks
Guest Posted June 15, 2003 Posted June 15, 2003 put this into the header where you need it <?php 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(); echo '</form>'; ?>
Salvo Posted June 15, 2003 Author Posted June 15, 2003 Matt, it seams that it doesn't work... it gives me an errror Parse error: parse error, expecting `','' or `';'' in Any Idea? Thanks
Salvo Posted June 15, 2003 Author Posted June 15, 2003 I might have managed to have the currencies out of the infobx. can someone try it as well and report? Thanks <?php /* $Id: currencies.php,v 1.16 2003/02/12 20:27:31 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ if (isset($currencies) && is_object($currencies)) { ?> <!-- currencies //--> <?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(); ?> <!-- currencies_eof //--> <?php } ?>
♥stubbsy Posted May 15, 2006 Posted May 15, 2006 Hi there, I wanted to do the same thing and found this post in a search. The code works ok but the form tag wasn't closed. For anyone else lookingto place the currencies drop down in the header then this works <!-- currencies //--> <?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(); echo '</form>'; ?> <!-- currencies_eof //-->
Recommended Posts
Archived
This topic is now archived and is closed to further replies.