Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Order error


The Pretender

Recommended Posts

Posted

hi there i have this error on every user that want's to make an order to my site they get this al the time

 

Does anyone know how to get rid of this error or any idea? thnx

 

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

Posted

Go into /catalog/includes/funtions/database.php find this line :

 

function teb_db_query

 

add this line below:

 

error_log('[QUERY] ' . $query . "\n");

 

And this one really works!!!

Posted

Tried this and the set primary default to true. Neither worked. What did work, the following change to create_account.php.

 

Change this which is around line 212.

 

      tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'");

     tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customer_id . "', '0', now())");

     if (SESSION_RECREATE == 'True') {
       tep_session_recreate();
     }

     $customer_first_name = $firstname;
     $customer_default_address_id = $address_id;

 

To:

      tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '1' where customers_id = '" . (int)$customer_id . "'");

     tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customer_id . "', '0', now())");

     if (SESSION_RECREATE == 'True') {
       tep_session_recreate();
     }

     $customer_first_name = $firstname;
     $customer_default_address_id = '1';

 

Works for me on a live site... Cannot believe that I had to hard-code that though.

Posted

I installed Purchase Without Account, and if a space is used in Street or City address fields on Order_Info.php then "sometimes" this error occurs and nothing shows except "," for the Shipping or Billing Address.

 

checkout_confirmation.php - error message

==============================================

 

Billing Address (Edit)

 

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/username/mydomain-www/catalog/includes/functions/general.php on line 54

 

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/username/mydomain-www/catalog/includes/functions/general.php on line 54

 

===============================================

 

my line 54 in general.php is

 

return htmlspecialchars($string);

 

 

Has anybody else using PWA seen :( or solved :) this bug? The solutions I've found in the forums and bug reports don't seem to apply to PWA...

 

Any suggestions are appreciated.

 

Thanks,

EricK

  • 5 months later...
Posted

I am having same issue

 

Delivery Address (Edit)

 

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

 

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

 

 

I intalled checkout without and account

 

 

 

:o

Posted
Tried this and the set primary default to true. Neither worked. What did work, the following change to create_account.php.

 

Change this which is around line 212.

 

 ? ? ?tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'");

? ? ?tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customer_id . "', '0', now())");

? ? ?if (SESSION_RECREATE == 'True') {
? ? ? ?tep_session_recreate();
? ? ?}

? ? ?$customer_first_name = $firstname;
? ? ?$customer_default_address_id = $address_id;

 

To:

 ? ? ?tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '1' where customers_id = '" . (int)$customer_id . "'");

? ? ?tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customer_id . "', '0', now())");

? ? ?if (SESSION_RECREATE == 'True') {
? ? ? ?tep_session_recreate();
? ? ?}

? ? ?$customer_first_name = $firstname;
? ? ?$customer_default_address_id = '1';

 

Works for me on a live site... Cannot believe that I had to hard-code that though.

I follow this method, but it still has problem.

 

It should be occur problem when the user account use " ; , ' <== this symbol

  • 2 weeks later...

Archived

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

×
×
  • Create New...