You are here

function uc_cart_update_item in Ubercart 7.3

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

Updates a cart item.

Parameters

$item: The loaded cart item.

Return value

unknown_type

1 call to uc_cart_update_item()
UbercartCartCheckoutTestCase::testCartApi in uc_cart/tests/uc_cart.test
Tests cart API.

File

uc_cart/uc_cart.module, line 1118

Code

function uc_cart_update_item($item) {
  $item_entity = entity_load_single('uc_cart_item', $item->cart_item_id);
  $item_entity->qty = $item->qty;
  $item_entity->data = $item->data;
  entity_save('uc_cart_item', $item_entity);
}