Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Currencies form out of infobox


Salvo

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

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

Posted

sorry you will need the form and /form as well

Posted

Thanks Meltus,

 

Could you post the full code to be put in the header as I can't make it work?

 

Thanks

Posted

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>';

?>

Posted

Matt, it seams that it doesn't work...

it gives me an errror

 

Parse error: parse error, expecting `','' or `';'' in

 

 

Any Idea?

 

Thanks

Posted

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

}

?>

  • 2 years later...
Posted

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 //-->

Archived

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

×
×
  • Create New...