Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12
  1. #11

    Default Re: How to delete products from shopping cart when user session ends

    Quote Originally Posted by DrByte View Post
    You are partly correct. The "script" has no flaws when applied against the version for which it was written.

    Between the time that code was posted 4 years ago and now, there have been numerous new releases and feature changes and security precautions added. One of those has to do with ensuring there's been no tampering with the shopping cart. And, since the code literally IS tampering with the shopping cart contents, it's triggering one of those safeties.

    The fix is simple. Add another line above the calculate() line, as shown:
    Code:
            $current_cart = $_SESSION['cart']->contents;
            $_SESSION['cart']->reset(true);
            $_SESSION['cart']->contents = $current_cart;
            $_SESSION['cart']->cartID = $_SESSION['cart']->generate_cart_id();
            $_SESSION['cart']->calculate();
    I am running v 1.3.9h and a customer called with the login error "Whoops! Sorry, but you are not allowed to perform the action requested" I am getting this error as well with my test account. This appears to be a recent problem. I searched for the above mentioned code and was unable to locate it in header_php.php file. Thanks in advance for the help.

  2. #12
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: How to delete products from shopping cart when user session ends

    You're posting in a thread discussing how to change normal operation of the store software.
    Why are you posting in this discussion? Did you attempt to make a similar change? Or are you just posting here because you're encountering an error message that happened to come up in search results?
    What exactly do you mean by "this appears to be a recent problem"? What have you changed in your site "recently"?
    Further, please answer all the questions in the Posting Tips section which appears when you click Reply.
    .

    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.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 12
    Last Post: 24 Jul 2008, 10:47 PM
  2. Empty cart when session ends ?
    By 4ecomm in forum Customization from the Admin
    Replies: 7
    Last Post: 24 Oct 2007, 06:39 PM
  3. Delete products from shopping cart
    By Exc3ss in forum General Questions
    Replies: 8
    Last Post: 23 Jun 2007, 10:56 AM

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