You are here

function uc_cart_product_is_shippable in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_cart/uc_cart.module \uc_cart_product_is_shippable()
2 calls to uc_cart_product_is_shippable()
uc_cart_is_shippable in uc_cart/uc_cart.module
uc_quote_action_get_quote in shipping/uc_quote/uc_quote.module
Retrive shipping quote and print JSON data.

File

uc_cart/uc_cart.module, line 2108

Code

function uc_cart_product_is_shippable($product) {

  // Return FALSE if the product form specifies this as not shippable.
  if ($product->data['shippable'] == FALSE) {
    return FALSE;
  }

  // See if any other modules have a say in the matter...
  $result = module_invoke_all('cart_item', 'can_ship', $product);

  // Return TRUE by default.
  if (empty($result) || in_array(TRUE, $result)) {
    return TRUE;
  }
  return FALSE;
}