You are here

function uc_order_is_shippable in Ubercart 7.3

Same name and namespace in other branches
  1. 5 uc_order/uc_order.module \uc_order_is_shippable()
  2. 6.2 uc_order/uc_order.module \uc_order_is_shippable()

Determines if an order is shippable.

An order can be shipped if any of its products can be shipped.

10 calls to uc_order_is_shippable()
template_preprocess_uc_order in uc_order/uc_order.module
Preprocesses a formatted invoice with an order's data.
uc_cart_checkout_form in uc_cart/uc_cart.pages.inc
The checkout form built up from the enabled checkout panes.
uc_cart_checkout_review in uc_cart/uc_cart.pages.inc
Allows a customer to review their order before finally submitting it.
uc_cybersource_hop_form in payment/uc_cybersource/uc_cybersource.module
Defines values to be posted to CyberSource.
uc_order_condition_is_shippable in uc_order/uc_order.rules.inc
Checks that the order is shippable.

... See full list

File

uc_order/uc_order.module, line 1738

Code

function uc_order_is_shippable($order) {
  if (!is_array($order->products) || empty($order->products)) {
    return FALSE;
  }
  foreach ($order->products as $product) {
    if (uc_order_product_is_shippable($product)) {
      return TRUE;
    }
  }
  return FALSE;
}