Post by jty » Tue Nov 11, 2008 8:51 am

I have noticed that Open Cart keeps the cart contents even after shutting down my PC. The cart contents aren't cleared unless the buyer checks out
My question is, when do the cookie cart contents expire (apart from checking out) ?

jty
Active Member

Posts

Joined
Sat Aug 30, 2008 8:19 am

Post by Qphoria » Tue Nov 11, 2008 8:54 am

Depends on your browser.
IE7 instantly on shut down
Firefox i think holds it for 2hours

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by jty » Tue Nov 11, 2008 9:16 am

Nah, I just tested on IE7
Added items to cart > shutdown
Came back in, logged in and the items are still in my cart.
Nevermind. I'll think of another way to sort out my latest can of worms.

I'll checkout your one step checkout today and post feedback there
Thanks again

jty
Active Member

Posts

Joined
Sat Aug 30, 2008 8:19 am

Post by mikeytrw » Wed Nov 26, 2008 10:03 pm

Im having cart clearing issues myself, even after loggin out. in fact, even after an order has been processed and cart->clear() has been called  ???

New member

Posts

Joined
Tue May 27, 2008 9:28 pm

Post by Qphoria » Wed Nov 26, 2008 10:41 pm

Cookies last 1 hour

To clear the cart properly, there are actually a few things to update:

Code: Select all

// Clears the cart itself
$cart->clear;
// Clear the cart session variable
$this->session->delete('cart');
// Clear the customer's db cart
$this->database->query("update customer set cart = '' where customer_id = '" . (int)$this->data['customer_id'];
Last edited by Qphoria on Thu Nov 27, 2008 8:16 pm, edited 1 time in total.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 19 guests