imlifu Posted July 31, 2006 Posted July 31, 2006 I installed oscommerce, everything runs smoothly, untill in order confirmation got error message, other part of the order confirmation are still fine. it doesn't affect the oscommerce working at all but it looks not nicely to customer, how to remove the following error message, I don't know PHP coding. It said the line42 in catalog/includes/functions/general.php got problems. I attached part of general.php code below. Any helps would be greatly appreciated. Order Confirmation Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/doveinnz/public_html/catalog/includes/functions/general.php on line 42 Part of general.php code here: 40 function tep_output_string($string, $translate = false, $protected = false) { 41 if ($protected == true) { 42// return htmlspecialchars($string); 43 } else { 44 if ($translate == false) { 45 return tep_parse_input_field_data($string, array('"' => '"')); 46 } else { 47 return tep_parse_input_field_data($string, $translate); 48 } 49 } 50 }
Guest Posted July 31, 2006 Posted July 31, 2006 I installed oscommerce, everything runs smoothly, untill in order confirmation got error message, other part of the order confirmation are still fine. it doesn't affect the oscommerce working at all but it looks not nicely to customer, how to remove the following error message, I don't know PHP coding. It said the line42 in catalog/includes/functions/general.php got problems. I attached part of general.php code below. Any helps would be greatly appreciated. Order Confirmation Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/doveinnz/public_html/catalog/includes/functions/general.php on line 42 Part of general.php code here: 40 function tep_output_string($string, $translate = false, $protected = false) { 41 if ($protected == true) { 42// return htmlspecialchars($string); 43 } else { 44 if ($translate == false) { 45 return tep_parse_input_field_data($string, array('"' => '"')); 46 } else { 47 return tep_parse_input_field_data($string, $translate); 48 } 49 } 50 } I have the same problem. Did you find what was causing it or does anyone know what could be causing this?
imlifu Posted July 31, 2006 Author Posted July 31, 2006 No I still haven't sorted out the problem, I think someone must know how to do, pleeeeeeeeeease help!!!
Andrew Yuen Posted August 1, 2006 Posted August 1, 2006 Try uncommenting line 42 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); } } } Andrew Yuen osCommerce, Community Team
imlifu Posted August 1, 2006 Author Posted August 1, 2006 Try uncommenting line 42 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); } } } Thank you andrew, after uncommenting in line42, the problem is still there. actually there was no original commenting in line42, after got the error message, I manually add commenting in line 42 as said it got problem. Any more idea?
♥Monika in Germany Posted August 1, 2006 Posted August 1, 2006 Hi Shawn, I've seent his before ... please check in phpmyadmin if your orders get a shipping and billing address entry. :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...
imlifu Posted August 1, 2006 Author Posted August 1, 2006 Hi Monika, yes you are right, that's fixed my problem. you are soooooooo smart lady, without your kind help, I can do nothing, :) thanks millions, have a nice day!
cherven Posted August 13, 2006 Posted August 13, 2006 Hello, I am having this same problem, how did you fix it?
sonictrip.net Posted September 26, 2006 Posted September 26, 2006 Hello, I am having this same problem, how did you fix it? Monika, in phpmyadmin, there are addresses showing up on the orders table but on the order confirmation page, the "Billing Address" and "Delivery Address" are just blank. It must be a problem in general.php, any ideas? This is the second OsC site for this to happen to on me and i cant remember what i did on the last site or where the post is even gone with the solution in it... :o
sonictrip.net Posted October 2, 2006 Posted October 2, 2006 Monika, in phpmyadmin, there are addresses showing up on the orders table but on the order confirmation page, the "Billing Address" and "Delivery Address" are just blank. It must be a problem in general.php, any ideas? This is the second OsC site for this to happen to on me and i cant remember what i did on the last site or where the post is even gone with the solution in it... :o Ok, after hours of searching ive finally found out how to fix the address problem. It's a db issue as far as i can tell (although some files have been replaced along the way like general.php orders.php html_output.php) but i think this is the main step to get the addresses showing: If you have a backup of your db (obviously u do) then load it into Word pad or something like that. Copy and paste the info separately for your "customers" table and the "address_book" table and execute the SQL in phpMyAdmin. Make sure you copy the table info and the values info incl. all your customers addresses etc. This should fix the problem! :thumbsup:
Recommended Posts
Archived
This topic is now archived and is closed to further replies.