Zen Cart Logo
Forums / General Questions / Sign In, Confirm Order jumping back to homepage

Sign In, Confirm Order jumping back to homepage

Locked

Views: 4,752

Results 1 to 20 of 27
This thread is locked. New replies are disabled.
15 Jun 2006, 2:02 PM
#1
restless avatar

restless

New Zenner

Join Date:
May 2006
Posts:
45
Plugin Contributions:
0

Sign In, Confirm Order jumping back to homepage

Sometimes when signing in it sends me back to the homepage instead of going to the checkout pages, however it does log me in and then I can proceed to checkout.

Then when clicking 'confirm order' it sometimes jumps back to the homepage so the I have to go through the whole checkout process again and it works!? So the session is not dying.

It's only happening SOMETIMES what could it be?

It has never happened on my development windows site but on the live linux site it seems to happen 1 out of 2 times.

I've tried uploading the whole windows dev site to the live on again but it still happened, I'm thinking it's something to do with the php configurations?

Please help, let me know the types of things I can check for thanks.

16 Jun 2006, 2:00 AM
#2
restless avatar

restless

New Zenner

Join Date:
May 2006
Posts:
45
Plugin Contributions:
0

Re: Sign In, Confirm Order jumping back to homepage

I have enabled Recreate Session and it made no difference still sending the user back to the index page on login and confirm order so I have disabeld it again.

I dont' believe the session is dying anyway as it does log the person in even tho they are thrown back to the homepage and when they do checkout a second time they can 'confirm order' successfully.

Any suggestions would be most helpful thanks

16 Jun 2006, 5:18 AM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Sign In, Confirm Order jumping back to homepage

What version of Zen Cart?
What mods have you installed?
What version of PHP?
What version of MySQL?
Please post your /includes/configure.php without passwords

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

16 Jun 2006, 5:31 AM
#4
restless avatar

restless

New Zenner

Join Date:
May 2006
Posts:
45
Plugin Contributions:
0

Re: Sign In, Confirm Order jumping back to homepage

Zen Version: 1.2.7
PHP Version: 4.3.10
MySQL: 3.23.49

  • Only Mod installed was the direct bank deposit mod I don't think has anything to do with the Sign In. It's just a Class and Language File.

Here's the important parts of my includes/configure.php the rest are just directory definitions.

define('ENABLE_SSL', 'false');

define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'db'); // leave empty '' for default handler or set to 'db'

define('SQL_CACHE_METHOD', 'none');
define('DIR_FS_SQL_CACHE', '/home/convert/public_html/topmobilephones/cache');

I'll have to sort through the actual code to see where is the condition that says redirect to the homepage even if the login is true and it does log them in

Thanks for your help

16 Jun 2006, 5:36 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Sign In, Confirm Order jumping back to homepage

If you uninstall the bank deposit module and use Money Order or COD, does the same problem re-occur?
If not, then it could be some sort of error condition in the bank deposit module that's conflicting with a server configuration setting of some sort... (Does it do any external communications to a bank, etc?)

Can you determine any sort of pattern to the "sometimes"?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

16 Jun 2006, 5:58 AM
#6
restless avatar

restless

New Zenner

Join Date:
May 2006
Posts:
45
Plugin Contributions:
0

Re: Sign In, Confirm Order jumping back to homepage

No I highly doubt it something to do with the MOD as it never fails on my development server (windows) just on the live server (linux) which has the specifications above. The MOD should not affect the login code anyway as it's only the class and language file. The MOD does not connect to any bank, it's quite simply really just stores the order info and then displays the invoice number so then the customer has to go to the bank and transfer the money.

There is no pattern I've tried it many times, it's definetly random.

Before I trawl through the code to see where this would be happening maybe you could let me know where to look for the login code, then I can start doing some testing

thanks for you help!

16 Jun 2006, 7:52 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Sign In, Confirm Order jumping back to homepage

I'd be interested to know if there are any messages in your server's error_log when this happens.

As to code ... modules/checkout_process.php and the modules/pages/checkout_confirmation/header_php.php will be your driving components, as a starting point.

I'm not so sure it's the code, but a PHP thing as you suggested initially.
However, you might be able to build some logging into the various stages of the process so you can at least determine what stages were accomplished before it happens.... to help narrow things down. Naturally, you don't want your customers to see any of the logging etc or you'll end up with failed purchases.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

18 Jun 2006, 2:32 AM
#8
restless avatar

restless

New Zenner

Join Date:
May 2006
Posts:
45
Plugin Contributions:
0

Re: Sign In, Confirm Order jumping back to homepage

Ok had a look at the code and did some testing with the login and I discovered this is the code where it's redirecting the user to the homepage after signing SUCCESSFULLY.

if (sizeof($_SESSION['navigation']->snapshot) > 0) {

//redirect to checkout shipping

} else {

//code redirects user to homepage

}

Why should snapshot be empty sometimes and other times not empty? The Session information is definetly not empty except for that property.

Here's the complete session information when it sent me back to the hompage upon SUCCESSFUL login

Array
(
[customers_host_address] => syd-nxg-pr8.tpgi.com.au
[cartID] =>
[cart] => shoppingcart Object
(
[contents] => Array
(
[13] => Array
(
[qty] => 1
)

                [2] => Array
                    (
                        [qty] => 1
                    )

                [37] => Array
                    (
                        [qty] => 1
                    )

            )

        [total] => 0
        [weight] => 0
        [content_type] => 
        [free_shipping_item] => 0
        [free_shipping_weight] => 0
        [free_shipping_price] => 0
    )

[language] => english
[languages_id] => 1
[currency] => AUD
[check_valid] => true
[navigation] => navigationhistory Object
    (
        [path] => Array
            (
                [0] => Array
                    (
                        [page] => index
                        [mode] => NONSSL
                        [get] => 
                        [post] => Array
                            (
                            )

                    )

                [1] => Array
                    (
                        [page] => index
                        [mode] => NONSSL
                        [get] => 
                        [post] => Array
                            (
                            )

                    )

                [2] => Array
                    (
                        [page] => index
                        [mode] => NONSSL
                        [get] => Array
                            (
                                [randomNum] => 2535812828
                                [action] => viewed_homepage
                                [timeStamp] => 1150597523.812
                            )

                        [post] => Array
                            (
                            )

                    )

                [3] => Array
                    (
                        [page] => product_info
                        [mode] => NONSSL
                        [get] => Array
                            (
                                [products_id] => 2
                                [action] => add_product
                            )

                        [post] => Array
                            (
                                [cart_quantity] => 1
                                [products_id] => 2
                            )

                    )

                [4] => Array
                    (
                        [page] => shopping_cart
                        [mode] => NONSSL
                        [get] => 
                        [post] => Array
                            (
                            )

                    )

                [5] => Array
                    (
                        [page] => index
                        [mode] => NONSSL
                        [get] => 
                        [post] => Array
                            (
                            )

                    )

                [6] => Array
                    (
                        [page] => index
                        [mode] => NONSSL
                        [get] => 
                        [post] => Array
                            (
                            )

                    )

                [7] => Array
                    (
                        [page] => login
                        [mode] => NONSSL
                        [get] => Array
                            (
                                [action] => process
                            )

                        [post] => Array
                            (
                                [email_address] => [email protected]
                                [password] => minemine
                            )

                    )

            )

        [snapshot] => Array
            (
            )

    )

[update_expirations] => true
[HTTP_REFERER] => 
[trackHomePageView] => 1
[dataTrackSessionId] => 1019
[new_products_id_in_cart] => 
[valid_to_checkout] => 1
[cart_errors] => 
[customer_id] => 1
[customer_default_address_id] => 1
[customers_authorization] => 0
[customer_first_name] => andrew
[customer_country_id] => 13
[customer_zone_id] => 0

)

18 Jun 2006, 2:35 AM
#9
restless avatar

restless

New Zenner

Join Date:
May 2006
Posts:
45
Plugin Contributions:
0

Re: Sign In, Confirm Order jumping back to homepage

And here is Snapshot when it did successfully send me to the checkout shipping page

Array
(
[page] => checkout_shipping
[mode] => NONSSL
[get] =>
[post] => Array
(
)

)

18 Jun 2006, 2:44 AM
#10
restless avatar

restless

New Zenner

Join Date:
May 2006
Posts:
45
Plugin Contributions:
0

Re: Sign In, Confirm Order jumping back to homepage

Sorry I got the code comments mixed up it should be

if (sizeof($_SESSION['navigation']->snapshot) > 0) {

//redirect to checkout shipping

} else {
//code redirects user to homepage
}

So if the Snapshot is not empty then continue to checkout shipping else if the Snapshot is empty redirect them to the homepage

I might just remove this code all together as I want it to go checkout shipping. I don't think it will have any effect on anything else?

18 Jun 2006, 3:18 AM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Sign In, Confirm Order jumping back to homepage

restless:

I might just remove this code all together as I want it to go checkout shipping. I don't think it will have any effect on anything else?
So, if someone comes to the site and just clicks Login, you want them to be directed to checkout right away?

I have no idea why it would be "losing" navigation info if it has been set. That does seem odd.

What exact steps can reproduce this behaviour? Is there a pattern to the order of pages accessed prior to being prompted to login? ie: what are the previous 5-10 pages/clicks before this is triggered. How consistent is it? What browsers are more problematic than others?

Can you post a url to your zc_install/techsupp.php so we can review your PHP configuration settings, etc?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

18 Jun 2006, 3:38 AM
#12
restless avatar

restless

New Zenner

Join Date:
May 2006
Posts:
45
Plugin Contributions:
0

Re: Sign In, Confirm Order jumping back to homepage

Oh you're right if I remove that code it will send them to checkout if they are just logiging in and didn't purcahse. Hmm most people would only create an account and purchase I would guess but for my testing I'm logging in. All I'm doing is:

Selecting the product -> clicking buy -> clicking checkout -> Signing in

And it only redirects to the login sometimes instead of the checkout.

My bigger problem is the redirecting to the homepage on clicking 'confirm order' I have put some logging in there to track what condition it's redirecting on but I haven't been able to recreate this problem since putting the tracking in! aarrgg well anyway if it happens to customer I'll be able to see what condition it happened on.

I don't have the techsupp.php file anymore as i've removed the zc_install has your meant to.

18 Jun 2006, 4:16 AM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Sign In, Confirm Order jumping back to homepage

restless:

I don't have the techsupp.php file anymore as i've removed the zc_install has your meant to.
(You could upload it again, even rename it so the warnings dont' display in your shop.)

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

18 Jun 2006, 9:36 PM
#15
wilt avatar

wilt

Oji-san

Join Date:
Jun 2003
Location:
Newcastle UK
Posts:
1,897
Plugin Contributions:
3

Re: Sign In, Confirm Order jumping back to homepage

Hi,

You mention in your first post that the problem occurs on your live linux site. However the teccsupp link you have sent describes a Windows Server ???

18 Jun 2006, 10:46 PM
#16
restless avatar

restless

New Zenner

Join Date:
May 2006
Posts:
45
Plugin Contributions:
0

Re: Sign In, Confirm Order jumping back to homepage

Strange I'm almost certain it's linux server.

And actually I've discovered it does not only happen on the live server it happens on both anyway.

The Snapshot path just disapears sometimes but the rest of the Session information is there.

I have tested it on 4 different computers and seen it happen so I dont' think it's client specific.

Thanks

19 Jun 2006, 3:50 AM
#17
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Sign In, Confirm Order jumping back to homepage

Again, what exact steps can make it happen (even if not consistently).
Which pages do they go to prior to getting to the login page?

Also, this setting would suggest some odd problems might occur:
PHP session.use_trans_sid = ON
You would have been warned about it at install-time.

Try adding this to your /.htaccess file:```
php_flag session.use_trans_sid off

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

19 Jun 2006, 4:15 AM
#18
restless avatar

restless

New Zenner

Join Date:
May 2006
Posts:
45
Plugin Contributions:
0

Re: Sign In, Confirm Order jumping back to homepage

Thanks I have put the .htaccess in and it's now turned off

How would this help do you think?

The steps that can make it happen is this:

Selecting the product -> clicking buy -> clicking checkout -> Signing in

Just a straight forward purchase.

19 Jun 2006, 7:16 AM
#19
restless avatar

restless

New Zenner

Join Date:
May 2006
Posts:
45
Plugin Contributions:
0

Re: Sign In, Confirm Order jumping back to homepage

The php_flag session.use_trans_sid off is not working

I put some logging in for the 'Confirm Order' button. I discovered this is the condition where it's sending the user back to the homepage in

includes/modules/checkout_process.php

if (!isset($_SESSION['payment']) && !$credit_covers) {
zen_redirect(zen_href_link(FILENAME_DEFAULT));
}

because $_SESSION['payment'] is empty BUT when I hit back on the browser and refresh the submit again it works! so $_SESSION['payment'] would not be empty then!

I willl try to see what $_SESSION['payment'] contains when it's successfull

19 Jun 2006, 7:23 AM
#20
restless avatar

restless

New Zenner

Join Date:
May 2006
Posts:
45
Plugin Contributions:
0

Re: Sign In, Confirm Order jumping back to homepage

Oh I see $_SESSION['payment'] contains the type of payment being done.

The problem seems to be certain stuff disappearing from the $_SESSION even tho most of the other session data is there!

I'm pretty sure during the order/payment process it does not Unset session data anywhere? Only when they logout?