Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

    Default 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?

  2. #2
    Join Date
    May 2005
    Location
    Bath, Somerset
    Posts
    1,053
    Plugin Contributions
    3

    Default 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
    Back, after a 4 year absence! Did you miss me?
    Absolute Web Solutions Ltd
    Interested in our work? Take a look at one of our sites - The Tech Store

  3. #3
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

    Default Re: Value of main_page being returned incorrectly

    Quote Originally Posted by Absolute View Post
    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.

  4. #4
    Join Date
    May 2005
    Location
    Bath, Somerset
    Posts
    1,053
    Plugin Contributions
    3

    Default 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
    Back, after a 4 year absence! Did you miss me?
    Absolute Web Solutions Ltd
    Interested in our work? Take a look at one of our sites - The Tech Store

  5. #5
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

    Default Re: Value of main_page being returned incorrectly

    Quote Originally Posted by Absolute View Post
    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.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,380
    Blog Entries
    7
    Plugin Contributions
    274

    Default 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
    .

    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.

  7. #7
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

    Default Re: Value of main_page being returned incorrectly

    Quote Originally Posted by DrByte View Post
    Sounds like one or more addons are bad. When uncertain, go back to basics: http://www.zen-cart.com/wiki/index.p...Obscure_Issues
    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!

  8. #8
    Join Date
    May 2005
    Location
    Bath, Somerset
    Posts
    1,053
    Plugin Contributions
    3

    Default 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
    Back, after a 4 year absence! Did you miss me?
    Absolute Web Solutions Ltd
    Interested in our work? Take a look at one of our sites - The Tech Store

 

 

Similar Threads

  1. Replies: 2
    Last Post: 3 Dec 2014, 12:19 AM
  2. v150 Database updated incorrectly when Gift Certificate covers order value?
    By boardshorts in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 3
    Last Post: 25 Dec 2013, 03:00 AM
  3. Replies: 14
    Last Post: 24 Apr 2010, 07:04 AM
  4. Price Range Value Being Ignored
    By Funkoid in forum Setting Up Specials and SaleMaker
    Replies: 0
    Last Post: 26 Jan 2010, 06:00 PM
  5. Tax being calculated incorrectly
    By Ripper in forum General Questions
    Replies: 5
    Last Post: 16 Nov 2006, 10:59 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR