Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Clear cart if cusotmer logs out

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-27-2006, 05:23 AM
 
mmoskva mmoskva is offline
 

eXpert
  
Join Date: Aug 2005
Location: Pennsylvania
Posts: 306
 

Default Clear cart if cusotmer logs out

If a customer adds an items to their cart and then logs out; when they log back in I am re-directed to the cart page.

- If a cusotmer logs out, how can I clear the cart history, so the item is not saved into their basket. The cusotmer would have to re-add the item to their cart?
__________________
x-cart 4.0.16v
linux server
Reply With Quote
  #2  
Old 03-27-2006, 05:25 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

You would need to clear their cookie on logout. Why would you not want your customers to save their cart? Personlly I'd be annoyed to come back and find my cart empty as I often save a cart for future purchase.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 03-27-2006, 05:30 AM
 
mmoskva mmoskva is offline
 

eXpert
  
Join Date: Aug 2005
Location: Pennsylvania
Posts: 306
 

Default

How would I clear go about in clearing the cookies?
__________________
x-cart 4.0.16v
linux server
Reply With Quote
  #4  
Old 08-30-2013, 07:43 AM
 
ipointadam ipointadam is offline
 

Newbie
  
Join Date: Dec 2012
Posts: 2
 

Default Re: Clear cart if cusotmer logs out

I really need the cart to empty due to QTY control. I need items to drop from users carts upon logout. Is this possible?
__________________
4.1.5
Reply With Quote
  #5  
Old 08-30-2013, 08:55 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Clear cart if cusotmer logs out

It has to be custom coded to do that. But items in cart for one custom do not affect quantity for others - only after order is placed
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #6  
Old 08-30-2013, 10:09 AM
 
ipointadam ipointadam is offline
 

Newbie
  
Join Date: Dec 2012
Posts: 2
 

Default Re: Clear cart if cusotmer logs out

Quote:
Originally Posted by cflsystems
It has to be custom coded to do that. But items in cart for one custom do not affect quantity for others - only after order is placed

The way my system works is it immediately makes the QTY change. The client is complicated. Though for anyone else looking for the solution, this is what I did...

Open {XCART DIRECTORY}/includes/login.php

find
Code:
if ($mode == 'logout') {

add this right after it
Code:
db_query("UPDATE $sql_tbl[customers] SET cart='' WHERE username='$username'");
__________________
4.1.5
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:34 AM.

   

 
X-Cart forums © 2001-2020