Jump to content
blackman

Strange problem with "Consolidated Login Page with Guest Checkout"

Recommended Posts

Hi OSCOMMERCE/PHP experts!

 

I am searching for this error for two days now and I still cannot locate this strange behaviour.

 

I installed the following plugin

 

"Consolidated Login Page with Guest Checkout"

 

and it works like a charm (at least that is what I thought). I found an error now that I just cannot track down.

 

If someone checks out using a German Umlaut (äöüß) in one of the fields of the form he is redirected from the checkout_shipping.php to the login.php due to the customer_id is no longer registered or valid. This is the part of the code in the checkout_shipping.php that redirects him

 

// if the customer is not logged on, redirect them to the login page

  if (!tep_session_is_registered('customer_id')) {

    $navigation->set_snapshot();

    tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

  }

 

Without any Umlaut it is no problem at all, he is forwarded to the checkout. Apparently the whole session is destroyed, because the cart is empty afterwards, too. I just cannot find any difference between the handling of the (apparently) same form in the login.php compared to a "regular" registered user where using an Umlaut is no problem at all. 

 

It seems that some function is called that has problems with these special characters, but is only used when the guest flag is set and the guest checkout is used therefore destroying the whole session. At least that is the only thing I could imagine....

 

Has anyone any hint where I could search or point me in the right direction what could cause this error / or anyone installed this plugin, too and can try, if the same error happens - I'm searcing for days now, it's driving me crazy... :)

 

 

Thanky you!!!

Robert

 

PHP 5.3.29 / OsCommerce 2.3.3.4

Share this post


Link to post
Share on other sites

Hi @@blackman

what session type do you use and what is the session table charset if you use it?


:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Share this post


Link to post
Share on other sites

Hi,

 

the type is 'http' and the charset used is 'utf-8' everywhere in the shop and the database - if I check out as a new customer (with an umlaut) it is no problem at all (and it is the same form according to the code, just some fields like password are missing).

 

If I change the form from 'post' to 'get' for testing purposes:

 

this doesn't work (first name: äTestgast):
 
this does (first name Testgast):

The '%C3%A4' is apparently causing the behaviour (an 'ä', the '%2B' not (which is a '+'). I'm confused...

Edited by blackman

Share this post


Link to post
Share on other sites

urlencode is a good php function before render email address

 

urlencode($email_address)

after it when use as input it should reverse email address

urldecode($HTTP_GET_VARS['email_address'])

except superglobals ($_GET) where urldecode is working automaticaly. $HTTP_GET_VARS doesnt do this so you have to do decoding and after it you can save it into the session


:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×