function uc_product_get_shipping_type in Ubercart 7.3
Same name and namespace in other branches
- 8.4 shipping/uc_quote/uc_quote.module \uc_product_get_shipping_type()
- 5 shipping/uc_quote/uc_quote.module \uc_product_get_shipping_type()
- 6.2 shipping/uc_quote/uc_quote.module \uc_product_get_shipping_type()
Gets a product's shipping type.
Parameters
$product: A product object.
Return value
The product's shipping type, or the store's default shipping type if the product's is not set.
5 calls to uc_product_get_shipping_type()
- uc_quote_assemble_quotes in shipping/
uc_quote/ uc_quote.pages.inc - Pulls the get_quote_from_* triggers and assembles their returned data.
- uc_shipping_new_package in shipping/
uc_shipping/ uc_shipping.admin.inc - Puts ordered products into a package.
- uc_shipping_package_edit in shipping/
uc_shipping/ uc_shipping.admin.inc - Rearranges the products in or out of a package.
- uc_ups_form_alter in shipping/
uc_ups/ uc_ups.module - Implements hook_form_alter().
- uc_usps_form_alter in shipping/
uc_usps/ uc_usps.module - Implements hook_form_alter().
1 string reference to 'uc_product_get_shipping_type'
- uc_quote_entity_property_info_alter in shipping/
uc_quote/ uc_quote.info.inc - Implements hook_entity_property_info_alter().
File
- shipping/
uc_quote/ uc_quote.module, line 417 - The controller module for fulfillment modules that process physical goods.
Code
function uc_product_get_shipping_type($product) {
$shipping_type = variable_get('uc_store_shipping_type', 'small_package');
if (isset($product->nid) && ($type = uc_quote_get_shipping_type('product', $product->nid))) {
$shipping_type = $type;
}
return $shipping_type;
}