You are here

function uc_cart_update_item_object in Ubercart 6.2

Same name and namespace in other branches
  1. 5 uc_cart/uc_cart.module \uc_cart_update_item_object()
  2. 7.3 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 1627

Code

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

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