Empty cart when session ends ?
Hi
We currently manage our product catalogue pretty intensely and products can be deleted from the site on a daily basis.
However we are getting orders coming htrough for products that have (it seems) been stored in a shopping cart from BEFORE we deleted a product.
The customer then completes the order with the DELETED product which can cause problems with our despatch staff.
Is there any way we can force a shopping cart to be emptied when the customer ends their session ?
Thanks
4ec
Re: Empty cart when session ends ?
What version of Zen Cart are you running?
Re: Empty cart when session ends ?
Apparently . . .
"Your version of Zen Cart™ appears to be current."
Zen Cart 1.3.6
Database Patch Level: 1.3.6
cheers
4ec
Re: Empty cart when session ends ?
or not ...
v1.3.7 - http://www.zen-cart.com/forum/showthread.php?t=54615
v1.3.7.1 - http://www.zen-cart.com/forum/showthread.php?t=69769
Nevertheless, auto-emptying of the shopping cart is not a built-in feature at the present time.
Re: Empty cart when session ends ?
hi
Thanks for that.
Is it an easy facility to implement ?
I see that my items can only be seen in the cart when I log on.
is it possible to delete them on session_end ??
Thanks
4ec
Re: Empty cart when session ends ?
Actually, you'd be better to delete the cart contents at login. That would require adding $_SESSION['cart']->reset(true); in appropriate places.
However ...
Zen Cart can be configured to not-allow-checkout if out-of-stock products are in the customer's cart. You can control those settings in Admin->Configuration->Stock
Additionally, the upcoming v1.3.8 has an option to display a "your previous shopping session cart contents have been restored ... please review before checkout" message, as mentioned here:
http://www.zen-cart.com/forum/showthread.php?t=68254
Re: Empty cart when session ends ?
i too have been looking for a way to empty the shopping cart at session end or start but reading your posts I then ask myself that its the customer who should decide if he wishes to keep or delete the items he put in there.
So,
Is it possible that on session init we check to see if the cat has goods in it from previous session and if yes we pop up a warning window infront of the main page that states :
YOU SHOPPING CART CONTAINS THE FOLLOWING ITEMS :
XXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXX
Do you wish to:
1/ Keep items and continue shopping ?
2/ Go to shopping cart menu to modify your previous selections
2/ Proceed to checkout ?
3/ Remove all items from shopping cart and continue ?
Sounds simple but I guess the pop up blocker is going to stop our window appearing?
I only just read your comments on 1.38. so wait and see ...?
Bye
Re: Empty cart when session ends ?
I only just read your comments on 1.38. but don't agree that this be set only in the admin.
Do you wish to display a Notice to the customer?
0= OFF, do not display a notice
1= Yes show notice and go to shopping cart
2= Yes show notice, but do not go to shopping cart
It should use these as defualt but give the customer the choice and associate this to his Customer default settings.