Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error in checkout


badass

Recommended Posts

Posted

I'm using alot of contributions, en lately i'm getting this error in checkout confirmation.php in the last prcess of an order.

 

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

 

 

The problem is i dont know when i how i created this error, does somebody knows how i can get rid of this, it's scaring away my customers.. :ph34r:

Posted

You saved the original code right? Go to that file and look at line 42 if you cant figure it out post the code someone will help.

 

IMPORTANT:SAVE AND BACKUP

 

ROLF

Posted

I copied the original file, confirmation_checkout.php

I copied the original file, general.php

 

But no change.

Posted

im having this problem too, anyone an idea whats causing it?

 

This is the error

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

 

Here is a snippet of code, from line 35 onwards, line 42 is marked.

// 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);  //THIS IS LINE 42

    } else {

      if ($translate == false) {

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

      } else {

        return tep_parse_input_field_data($string, $translate);

      }

    }

  }

Posted

I just fixed this without actually fixing it, which is weird.

 

Basically since signing up as a customer (test account) with my address based in the UK, I set the store to only allow customers from Australia. When I changed my address to an AUS one, the error dissapeared, which was just weird.

  • 4 weeks later...
Posted
Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/nexuspcc/public_html/catalog/includes/functions/general.php on line 42

 

I am getting that as well. In my case, it is in shopping_cart.php as I am using the shipping estimator. Nothing was done to cause this - it simply appeared out of the blue. :(

Posted
I am getting that as well. In my case, it is in shopping_cart.php as I am using the shipping estimator. Nothing was done to cause this - it simply appeared out of the blue. :(

Try contacting the contribution author or finding the support thread for the contribution.

Mark Evans

osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops)

 

---------------------------------------

Software is like sex: It's better when it's free. (Linus Torvalds)

Posted

It's not the contribution. I've got the problem as well and I'm not using that contribution.

RojanUK

Posted
Try contacting the contribution author or finding the support thread for the contribution.

Not very encouraging to know that even an osC developer doesn't know the answer... *YIKES* :unsure:

RojanUK

Posted
I just fixed this without actually fixing it, which is weird.

 

Basically since signing up as a customer (test account) with my address based in the UK, I set the store to only allow customers from Australia. When I changed my address to an AUS one, the error dissapeared, which was just weird.

My site is setup to only accept customer from the UK. In fact, I've done away with the country pull-down menu completely and it has UK statically inserted. I've created a test account after that mod and it worked like a charm. Creating an account still isn't a problem. However when I try and buy something on every page during checkout the address is listed perfectly both in shipping and billing, exept for the order_confirmation page. Then the htmlspecialchars error pops up instead of the addresses that displayed perfectly on the previous pages. But since I've only got one country I don't see how your solution could help me though... :(

RojanUK

Archived

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

×
×
  • Create New...