You are here

function uc_cart_empty in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_cart/uc_cart.module \uc_cart_empty()
  2. 7.3 uc_cart/uc_cart.module \uc_cart_empty()

Empties a cart of its contents.

2 calls to uc_cart_empty()
uc_2checkout_complete in payment/uc_2checkout/uc_2checkout.module
uc_cart_complete_sale in uc_cart/uc_cart.module
Completes a sale, including adjusting order status and creating user account.

File

uc_cart/uc_cart.module, line 2050

Code

function uc_cart_empty($cart_id) {
  if (is_null($cart_id) || empty($cart_id)) {
    return;
  }
  db_query("DELETE FROM {uc_cart_products} WHERE cart_id = '%s'", $cart_id);
}