Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2004
    Posts
    13
    Plugin Contributions
    0

    Default Saved Cart Items From Last Session

    Hi all,

    I would like to be able to make it so that each time a customer's session is over any items the person had in their cart are automatically taken out. In other words, right now my customers can add items to their cart and when they login it saves this info for them so that the next time they come back the items are still in their cart. Is there any way to disable this in the admin? If it is not a setting then if anyone point me to the code that would allow me to disable this? I am php proficient so if you could just tip me off on where to go about doing this in code I would appreciate it.

    Thank you all for your support.
    ::tup

  2. #2
    Join Date
    Nov 2003
    Posts
    1,155
    Plugin Contributions
    0

    Default

    Have you had any luck with this?

    I could use the same thing - desperate :)

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

    Default

    If you want the shopping cart to empty of old products from a previous login ... but not lose the current sessions of products that the customer has been shopping for the last hour ...

    Edit the file:

    /includes/modules/pages/login/header_php.php

    Comment out the restore and add the cleanup:

    Code:
    // restore cart contents
    //    $_SESSION['cart']->restore_contents();
    // empty old cart products
        $_SESSION['cart']->cleanup();
    This is the cleanest method that I can find to manage the cart content when:

    1 guest is shopping and hits Checkout ... goes to login and has an existing account and old products in cart

    2 guest shopping and hits login to create an account

    3 guest is shopping and hits login to create an account and goofs and is changed to create_account

    4 guest is shopping and hits login to existing account with old cart of products

    In all scenarios, all that will be in the shopping_cart following the successful login or create account will be products from the current session ...

    All old products from a previous session will be removed silently in the background ...

    No, no ... no need for applause ... just send money ... B)
    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!

  4. #4
    Join Date
    Nov 2003
    Posts
    1,155
    Plugin Contributions
    0

    Default

    Originally posted by Ajeh@Dec 17 2005, 01:14 PM
    No, no ... no need for applause ... just send money ... B)
    Done!

    Thanks, Linda :)

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

    Default

    Thanks very much ... your support is greatly appreciated :)

    Glad this solution worked for you!
    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!

  6. #6
    Join Date
    Dec 2008
    Posts
    11
    Plugin Contributions
    0

    Default Re: Saved Cart Items From Last Session

    I know this thread is old. But for anyone else looking for this, during paypal express checkout is not sufficient to add this code to /includes/modules/pages/login/header_php.php

    But you must also add it to: /includes/modules/payment/paypalwpp.php

    just search for the line with:

    $_SESSION['cart']->restore_content();

    and replace it with the code Ajeh provided

    this works for me as of v1.3.9h

 

 

Similar Threads

  1. v139h Items in Saved Cart Sort Order
    By chadderuski in forum Managing Customers and Orders
    Replies: 4
    Last Post: 13 May 2016, 07:38 PM
  2. Deleting Saved Items in Cart
    By thegoodlifestore in forum Managing Customers and Orders
    Replies: 6
    Last Post: 27 Mar 2012, 11:26 PM
  3. Cart items not saved in Opera
    By Magic Muscle in forum General Questions
    Replies: 4
    Last Post: 17 Mar 2011, 04:50 AM
  4. Saved cart items from previous session
    By Loque in forum Managing Customers and Orders
    Replies: 25
    Last Post: 15 Aug 2008, 09:48 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