function basic_cart_is_product in Basic cart 7.3
Same name and namespace in other branches
- 7.2 basic_cart.module \basic_cart_is_product()
Helper function. Returns true if given node (node object or string node type) is a product.
1 call to basic_cart_is_product()
File
- ./
basic_cart.module, line 416
Code
function basic_cart_is_product($node) {
$type = is_object($node) ? $node->type : $node;
// Getting node types.
$node_types = basic_cart_product_types();
if (empty($node_types) || !is_array($node_types)) {
return FALSE;
}
return in_array($type, $node_types);
}