Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

problem with order information


apilon45

Recommended Posts

Good day all ,

 

I was testing my website and entered an order when i tried to view the order history here is what appears in order information

 

Order #3 (Pending)

Order Date: Saturday 10 January, 2009 Order Total: $11.28

Delivery Address

 

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/digitalh/public_html/includes/functions/general.php on line 42

 

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/digitalh/public_html/includes/functions/general.php on line 42

test account

8017 Saint-Hubert

Montréal, H2P 1P4

Quebec,

Shipping Method

Canada Post (1 box(es) to be shipped) (Regular, 2009-01-14)

 

Products

1 x

 

 

 

and here is the information i have in general.php for that section

 

<?php

/*

$Id: general.php 1739 2007-12-20 00:52:16Z hpdl $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2007 osCommerce

 

Released under the GNU General Public License

*/

 

////

// Redirect to another page or site

function tep_redirect($url) {

global $logger;

 

if ( (strstr($url, "\n") != false) || (strstr($url, "\r") != false) ) {

tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));

}

 

header('Location: ' . $url);

 

if (STORE_PAGE_PARSE_TIME == 'true') {

if (!is_object($logger)) $logger = new logger;

$logger->timer_stop();

}

 

exit;

}

 

////

// Parse the data used in the html tags to ensure the tags will not break

function tep_parse_input_field_data($data, $parse) {

return strtr(trim($data), $parse);

}

 

function tep_output_string($string, $translate = false, $protected = false) {

if ($protected == true) {

return htmlspecialchars($string);

} else {

if ($translate == false) {

return tep_parse_input_field_data($string, array('"' => '"'));

} else {

return tep_parse_input_field_data($string, $translate);

}

}

}

 

function tep_output_string_protected($string) {

return tep_output_string($string, false, true);

}

 

function tep_sanitize_string($string) {

$string = ereg_replace(' +', ' ', $string);

 

return preg_replace("/[<>]/", '_', $string);

}

 

function tep_customers_name($customers_id) {

$customers = tep_db_query("select customers_firstname, customers_lastname from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customers_id . "'");

$customers_values = tep_db_fetch_array($customers);

 

return $customers_values['customers_firstname'] . ' ' . $customers_values['customers_lastname'];

}

 

function tep_get_path($current_category_id = '') {

global $cPath_array;

 

if ($current_category_id == '') {

$cPath_new = implode('_', $cPath_array);

} else {

if (sizeof($cPath_array) == 0) {

$cPath_new = $current_category_id;

} else {

$cPath_new = '';

$last_category_query = tep_db_query("select parent_id from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$cPath_array[(sizeof($cPath_array)-1)] . "'");

$last_category = tep_db_fetch_array($last_category_query);

 

$current_category_query = tep_db_query("select parent_id from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");

$current_category = tep_db_fetch_array($current_category_query);

 

if ($last_category['parent_id'] == $current_category['parent_id']) {

for ($i = 0, $n = sizeof($cPath_array) - 1; $i < $n; $i++) {

$cPath_new .= '_' . $cPath_array[$i];

}

} else {

for ($i = 0, $n = sizeof($cPath_array); $i < $n; $i++) {

$cPath_new .= '_' . $cPath_array[$i];

}

}

 

$cPath_new .= '_' . $current_category_id;

 

if (substr($cPath_new, 0, 1) == '_') {

$cPath_new = substr($cPath_new, 1);

}

}

}

 

return 'cPath=' . $cPath_new;

}

 

function tep_get_all_get_params($exclude_array = '') {

global $HTTP_GET_VARS;

 

if ($exclude_array == '') $exclude_array = array();

 

$get_url = '';

 

reset($HTTP_GET_VARS);

while (list($key, $value) = each($HTTP_GET_VARS)) {

if (($key != tep_session_name()) && ($key != 'error') && (!in_array($key, $exclude_array))) $get_url .= $key . '=' . $value . '&';

}

 

return $get_url;

}

 

function tep_date_long($raw_date) {

if ( ($raw_date == '0000-00-00 00:00:00') || ($raw_date == '') ) return false;

 

$year = (int)substr($raw_date, 0, 4);

$month = (int)substr($raw_date, 5, 2);

$day = (int)substr($raw_date, 8, 2);

$hour = (int)substr($raw_date, 11, 2);

$minute = (int)substr($raw_date, 14, 2);

$second = (int)substr($raw_date, 17, 2);

 

return strftime(DATE_FORMAT_LONG, mktime($hour, $minute, $second, $month, $day, $year));

}

 

 

 

Any idea what is wrong

 

Thank you

 

 

Alain

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...