views:

12

answers:

1

How do you clear out open carts (non completed checkouts) in Ubercart? I don't see a function or admin setting to do this unless I looked in the wrong place.

Example, I just want to clear out carts who have gone around and added things to their cart, but did not complete the order.

+1  A: 

uc_cart_empty() will clean the cart according to cart ID.
uc_cart_get_id() will give you the current cart ID.

What you want is to go over all uncompleted carts.
For registered users the cart ID is always the uid of the user.
For anonymous users, if I am not mistaken, the cart has a short lifetime, so no need to do it "manually".

Hope this helps, and in any way, this should be your starting points.
Regards,
Shushu

Shushu
Thanks, I missed this function. I'll try it out.
Kevin

related questions