Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Strange problem with "Consolidated Login Page with Guest Checkout"


blackman

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

Link to comment
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.

Link to comment
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
Link to comment
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...