function uc_quote_condition_product_shipping_type in Ubercart 5
Same name and namespace in other branches
- 6.2 shipping/uc_quote/uc_quote.module \uc_quote_condition_product_shipping_type()
Returns true if the order has a product of the chosen shipping type.
See also
uc_quote_condition_product_shipping_type_form
File
- shipping/
uc_quote/ uc_quote.module, line 298 - The controller module for fulfillment modules that process physical goods.
Code
function uc_quote_condition_product_shipping_type($order, $settings) {
$result = false;
foreach ($order->products as $product) {
if ($product->nid && uc_product_get_shipping_type($product) == $settings['type']) {
$result = true;
break;
}
}
return $result;
}