Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

currency contribution not visible in IE browser


spencermjax

Recommended Posts

When I follow the instructions to the contribution listed below, I can see the dropdown box (and it functions properly) in The Safari and Firefox but not in IE. Any ideas?

 

 

Wotzhotnow.net Added: Currency DropDown List v1.0
Greg Hooper [email protected]
Can be viewed at(soon): http://www.wotzhotnow.net


Currency_DropDown_List_v1_0 is a first release of this module
/*
 $Id: DropDown List v1.0 2004/07/17 19:06:13 gmh Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

After trolling through the contributions and the forum looking for
somthing that would do this, I gave up and started messin' with the
code myself. I am not a PHP coder, just someone that had a need.
This is something I really wanted on my site because I like a clean,
clutter free presentation. I primarily designed it for use in the,
header, but it could be used anywhere on the site so long as it is
placed between TD tags as shown below.

Though I have contributed several:
- rewrites of code
- merge of fixes and repackaged
- rewitten documentation
of other modules and contributions, this is my first actual contribution that provided
a solution. An image is include as a sample.

Greg Hooper (wotzhotnow)

================================================================================
=============
INSTALLATION:

STEP ONE:- catalog/includes/classes/boxes.php
================================================================================
=============
}
 }
<---- insert here ---->
?>

Right at the very end of the file, insert the following code before the closing ?> tag.

<!-- BOF Currency DropDown List v1.0 //-->

 class currency_dropdown extends tableBox {
function currency_header($contents) {
  $info_box_contents = array();
  $info_box_contents[] = array('text' => $this->infoBoxContents($contents));
  $this->table_cellpadding = '1';

  $this->table_parameters = '';

  $this->tableBox($info_box_contents, true);
}

function infoBoxContents($contents) {
  $this->table_cellpadding = '3';
  $this->table_parameters = 'class="infoBoxContents"';
  $info_box_contents = array();
  $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
  for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
	$info_box_contents[] = array(array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
									   'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
									   'params' => 'class="boxText"',
									   'text' => (isset($contents[$i]['text']) ? $contents[$i]['text'] : '')));
  }
  $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
  return $this->tableBox($info_box_contents);
}
 }
<!-- EOF Currency DropDown List v1.0 //-->

================================================================================
=============
INSTALLATION:

STEP TWO:- catalog/includes/header.php
================================================================================
=============

</td>
<---- insert here ---->
<td>

Insert the following code between and closed and opening TD tags. You may need to adjust 
TD size settings to suit your alignment needs.

<!-- BOF Currency DropDown List v1.0 //-->
<?php
 if (isset($currencies) && is_object($currencies)) {
?>
		<td WIDTH="120">
<?php
$info_box_contents = array();

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);
  }
}

$info_box_contents = array();
$info_box_contents[] = array('form' => tep_draw_form('currencies', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get'),
							 'align' => 'right',
							 'text' => tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onChange="this.form.submit();" style="width: 100%"') . $hidden_get_variables . tep_hide_session_id());
new currency_dropdown($info_box_contents);
?>
		</td>
<?php
 }
?>
<!-- EOF Currency DropDown List v1.0 //-->

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...