function uc_wishlist_update_item_object in UC Wish List 7
Same name and namespace in other branches
- 6 uc_wishlist.module \uc_wishlist_update_item_object()
Updates the quantity of all the items in a cart object.
1 call to uc_wishlist_update_item_object()
- uc_wishlist_view_form_submit in ./
uc_wishlist.pages.inc - Submission handler for wish list view form.
File
- ./
uc_wishlist.module, line 878 - Allows users to create public shopping/wish lists.
Code
function uc_wishlist_update_item_object($wform) {
if (is_object($wform)) {
if ($wform->wid) {
$wid = $wform->wid;
}
else {
$wid = uc_wishlist_get_wid();
}
foreach ($wform->items as $item) {
$data = unserialize($item['data']);
$wpid = $data['wpid'];
if ($item['remove']) {
module_invoke($item['module'], 'update_wishlist_item', $item['nid'], $data, 0, $wid, $wpid);
}
else {
module_invoke($item['module'], 'update_wishlist_item', $item['nid'], $data, $item['wantqty'], $wid, $wpid);
}
}
}
}