Value of main_page being returned incorrectly
I'm having a problem that's making me a little nuts and I'm hoping somebody can point me in the right direction.
I installed the Simple Google Analytics add on and the ecommerce tracking code did not appear to be generated in the page source. The normal tracking code was generated correclty.
I posted in the support thread for the add on and the owner of the add-on discovered that it is in fact being generated. It's just not being generated in my Firefox browser. Placing an order from a different browser on the same PC or using a Firefox browser on a different PC works as expected.
I added a line of code to echo the value of the main_page variable. This variable is being tested in the add-on to determine if the page is checkout_success. On my Firefox browser the value is being returned as time_out on the checkout success page even though the page is displaying properly. As a result the if path is never being followed. I've tried clearing cache, cookies, and running FF in safe mode with no change.
Any ideas?
Re: Value of main_page being returned incorrectly
Are you just refreshing the checkout_success page over and over on the first PC, or are you placing a fresh order each time? The reason I ask is that the checkout success page is a "dumb" page, meaning that it doesn't actually do anything with regard an order. By the time this page loads, the whole order process has completed. This page then checks the last order you placed, and displays the details of this order.
If you are testing on 2 PCs, and on one you place a fresh order and the code appears, and on the other, you just keep refreshing the same page to test code, it may be that once the code has been displayed, it is never shown again. Especially as this is order tracking code. When we code modules such as this, we add in a SESSION variable checker, so that we only post the data to the tracking system once. After all, you don't want someone to hit refresh 5 times and your tracker show that you've had 5 orders placed!
It might be worth logging out of the session on one PC, and then placing a fresh order. Remember to remove all cached files and cookies, just in case.
Absolute
Re: Value of main_page being returned incorrectly
Quote:
Originally Posted by
Absolute
Are you just refreshing the checkout_success page over and over on the first PC, or are you placing a fresh order each time? The reason I ask is that the checkout success page is a "dumb" page, meaning that it doesn't actually do anything with regard an order. By the time this page loads, the whole order process has completed. This page then checks the last order you placed, and displays the details of this order.
If you are testing on 2 PCs, and on one you place a fresh order and the code appears, and on the other, you just keep refreshing the same page to test code, it may be that once the code has been displayed, it is never shown again. Especially as this is order tracking code. When we code modules such as this, we add in a SESSION variable checker, so that we only post the data to the tracking system once. After all, you don't want someone to hit refresh 5 times and your tracker show that you've had 5 orders placed!
It might be worth logging out of the session on one PC, and then placing a fresh order. Remember to remove all cached files and cookies, just in case.
Absolute
Thanks for the reply. I'm not refreshing the page. I go through the order process fresh each time. I've tried rebooting the PC and running through a new order with the same result.
Re: Value of main_page being returned incorrectly
Do you have force new sessions turned on in the admin?
When you reboot your computer, are you also clearing all cache and cookies? Cookies remain even if you reboot the PC, and if you are still within the session time limit, it may be that you are simply re-establishing the same session.
Absolute
Re: Value of main_page being returned incorrectly
Quote:
Originally Posted by
Absolute
Do you have force new sessions turned on in the admin?
When you reboot your computer, are you also clearing all cache and cookies? Cookies remain even if you reboot the PC, and if you are still within the session time limit, it may be that you are simply re-establishing the same session.
Absolute
I'm not sure exactly which setting you're referring to. If its recreate session then that is set to true. If not can you point me to where that's set?
I'll try doing a reboot followed by clearing cache and cookies to be sure that's the way I did it.
Re: Value of main_page being returned incorrectly
Sounds like one or more addons are bad. When uncertain, go back to basics: http://www.zen-cart.com/wiki/index.p...Obscure_Issues
Re: Value of main_page being returned incorrectly
Quote:
Originally Posted by
DrByte
Thanks for that link. It seems that the problem was related to some cookies on the system. I found cookies for the website and zencart. After deleting the cookie the tracking code is generated as expected. Looks like Firefox doesn't do a real good job of cleaning up after itself. All is well!
Re: Value of main_page being returned incorrectly
Firefox cleans up after itself as it should. Cookies are designed to stay on your PC for as long as the software requires them. They are usual used so that you can return to a previous session, when the original session has expired, for example as you can with phpMyAdmin.
This is why when testing, you should regularly clear cache and cookies, so that you can see the changes you are implementing.
Absolute