Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Jun 2006
    Posts
    298
    Plugin Contributions
    0

    Default Can't add to cart "Whoops" error

    Can't add to cart. Getting the "Whoops" session time out error. I've been trying to figure this out for hours. I feel like I've tried everything.. hoping someone can help me figure this out.

    Version info:

    Version ZC 1.5.3
    Upgraded on 1/5 from 1.3.9h using official upgrade procedure.
    PHP Version: 5.2.17 (Zend: 2.2.0)
    Database: MySQL 5.5.40-36.1-log

    Session Settings:

    Session Directory /home/REMOVED/public_html/REMOVED/cache
    Cookie Domain False
    Force Cookie Use False
    Check SSL Session ID False
    Check User Agent False
    Check IP Address False
    Prevent Spider Sessions True
    Recreate Session True
    IP to Host Conversion Status true
    Keep Vistors Cart True
    Days Before Cart Expires 30
    Keep Cart Secret Key REMOVED
    Use root path for cookie path True
    Add period prefix to cookie domain False

    (Above settings work properly on my live cart...)

    Add-ons installed:

    Multilanguage Ezpages
    Simple SEO Url
    Edit Orders
    Ty Package Tracker
    Super Orders
    Cross Sell
    CSS JS Loader
    Combination Discounts
    Better Together
    Fast & Easy Checkout
    Image handler
    Zen Lightbox
    Return Authorization
    Testimonials Manager
    Sitemap XML
    EZ Pages in SiteMap
    Google analytics
    Print Order Invoice
    Keep Cart
    Attributes on product listing (I thought for sure it was this, but I rolled back and it wasn't working BEFORE this was installed.. )

    DEVSITE LINK

    I've tried disabling SSU, Keep cart.. Cleared my browser sessions/cache.. used different browser.. cleared database sessions.. went back to classic template, still not working.
    Last edited by abcisme; 16 Jan 2015 at 05:48 PM.

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Can't add to cart "Whoops" error

    If you switch to Classic Template does this work?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Jun 2006
    Posts
    298
    Plugin Contributions
    0

    Default Re: Can't add to cart "Whoops" error

    Nope! I feel like I've tried every combo of session settings.. and the above settings work properly on my live cart. I just can't nail down what's going on.

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,489
    Plugin Contributions
    88

    Default Re: Can't add to cart "Whoops" error

    The form on your product_info page(s) doesn't include the securityToken variable, most likely because your Zen Cart v1.3.9 variant of /includes/templates/YOUR_TEMPLATE/tpl_product_info_display.php hard-codes the <form> statement rather than using the Zen Cart zen_draw_form function, which properly appends the hidden variable that contains the securityToken.

    If you are receiving the error when you change to the classic template, that says to me that you overwrote the ZC1.5.3 template_default directory with the ZC1.3.9 versions of the files when you performed the upgrade.

  5. #5
    Join Date
    Jun 2006
    Posts
    298
    Plugin Contributions
    0

    Default Re: Can't add to cart "Whoops" error

    When I'm logged in and try to add to cart, I get a different error:

    Whoops! Sorry, but you are not allowed to perform the action requested.
    You are still logged in to your account and may continue shopping. Please choose a destination from a menu.

  6. #6
    Join Date
    Jun 2006
    Posts
    298
    Plugin Contributions
    0

    Default Re: Can't add to cart "Whoops" error

    Quote Originally Posted by lat9 View Post
    The form on your product_info page(s) doesn't include the securityToken variable, most likely because your Zen Cart v1.3.9 variant of /includes/templates/YOUR_TEMPLATE/tpl_product_info_display.php hard-codes the <form> statement rather than using the Zen Cart zen_draw_form function, which properly appends the hidden variable that contains the securityToken.

    If you are receiving the error when you change to the classic template, that says to me that you overwrote the ZC1.5.3 template_default directory with the ZC1.3.9 versions of the files when you performed the upgrade.
    My product info page form start:

    Code:
    <!--bof Form start-->
    <?php echo zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product', $request_type), 'post', 'enctype="multipart/form-data"') . "\n"; ?>
    <!--eof Form start-->
    My product info page in the default template is exactly as it came from the 1.5.3 package.
    Last edited by abcisme; 16 Jan 2015 at 06:11 PM.

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,489
    Plugin Contributions
    88

    Default Re: Can't add to cart "Whoops" error

    OK, check your /includes/functions/html_output.php file; the zen_draw_form function should look like:
    Code:
    /*
     *  Output a form
     */
      function zen_draw_form($name, $action, $method = 'post', $parameters = '') {
        $form = '<form name="' . zen_output_string($name) . '" action="' . zen_output_string($action) . '" method="' . zen_output_string($method) . '"';
    
        if (zen_not_null($parameters)) $form .= ' ' . $parameters;
    
        $form .= '>';
        if (strtolower($method) == 'post') $form .= '<input type="hidden" name="securityToken" value="' . $_SESSION['securityToken'] . '" />';
        return $form;
      }

  8. #8
    Join Date
    Jun 2006
    Posts
    298
    Plugin Contributions
    0

    Default Re: Can't add to cart "Whoops" error

    I COULD KISS YOU! LOL!

    I must have screwed that file up when I merged something (who knows what?!) There was a line missing!

    Code:
    /*
     *  Output a form
     */
      function zen_draw_form($name, $action, $method = 'post', $parameters = '') {
        $form = '<form name="' . zen_output_string($name) . '" action="' . zen_output_string($action) . '" method="' . zen_output_string($method) . '"';
    
        if (zen_not_null($parameters)) $form .= ' ' . $parameters;
    
        $form .= '>';
       if (strtolower($method) == 'post') $form .= '<input type="hidden" name="securityToken" value="' . $_SESSION['securityToken'] . '" />';
        return $form;
      }
    THANK YOU SO MUCH!!! I never would have figured it out on my own.

  9. #9
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,489
    Plugin Contributions
    88

    Default Re: Can't add to cart "Whoops" error

    No problems -- no kissing, either! Since there was at least one line missing from the html_output.php file, I suggest that you use a file-comparison tool like WinMerge or Beyond Compare to see if any other changes were missed!

  10. #10
    Join Date
    Jun 2006
    Posts
    298
    Plugin Contributions
    0

    Default Re: Can't add to cart "Whoops" error

    Winmerge is what got me into trouble in the first place... LOL! But I will definitely go through and make sure everything is right.

    Thanks again!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139h Cannot "add to cart", "sign up", or "log in". Returns to home.
    By Damn Kitten in forum General Questions
    Replies: 3
    Last Post: 12 Aug 2013, 03:11 AM
  2. Can't Checkout - "Whoops! Session Timeout" error
    By hauerjw in forum Installing on a Linux/Unix Server
    Replies: 5
    Last Post: 16 Dec 2011, 12:29 AM
  3. Replies: 26
    Last Post: 19 Feb 2010, 02:56 AM
  4. Replies: 2
    Last Post: 11 Feb 2010, 09:13 PM
  5. How can I rename the "add to cart" to "checkout now"?
    By InterSign in forum General Questions
    Replies: 5
    Last Post: 6 May 2008, 08:45 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