public function UcAjaxCart::addItemKitToCart in Ubercart AJAX Cart 6.2
Same name and namespace in other branches
- 7.2 uc_ajax_cart.extender.inc \UcAjaxCart::addItemKitToCart()
1 call to UcAjaxCart::addItemKitToCart()
File
- ./
uc_ajax_cart.php, line 56
Class
Code
public function addItemKitToCart($nodeID, $qty = 1, $data = array()) {
$node = node_load($nodeID);
if (!is_object($node) || !uc_product_is_product($node)) {
throw new NoProductException();
}
if ($this
->checkKitToCart($node, $data)) {
uc_product_kit_add_to_cart($node->nid, $qty, $data);
drupal_set_message(t('Add !product to cart.', array(
'!product' => $node->title,
)));
}
}