You are here

function uc_cart_update_item_object in Ubercart 7.3

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

Updates the quantity of all the items in a cart object.

1 call to uc_cart_update_item_object()
uc_cart_view_form_submit in uc_cart/uc_cart.module
Default submit handler for uc_cart_view_form().

File

uc_cart/uc_cart.module, line 1260

Code

function uc_cart_update_item_object($cart) {
  if (is_object($cart)) {
    foreach ($cart->items as $item) {
      module_invoke($item['module'], 'uc_update_cart_item', $item['nid'], unserialize($item['data']), $item['qty']);
    }

    // Rebuild the cached cart items.
    uc_cart_get_contents(NULL, 'rebuild');
  }
}