function uc_quote_set_shipping_type in Ubercart 5
Same name and namespace in other branches
- 8.4 shipping/uc_quote/uc_quote.module \uc_quote_set_shipping_type()
- 6.2 shipping/uc_quote/uc_quote.module \uc_quote_set_shipping_type()
- 7.3 shipping/uc_quote/uc_quote.module \uc_quote_set_shipping_type()
Store the shipping type of products and manufacturers.
Fulfillment modules are invoked for products that match their shipping type. This function stores the shipping type of a product or a manufacturer.
Parameters
$id_type: product | manufacturer
$id: Either the node id or term id of the object receiving the shipping type.
$shipping_type: The type of product that is fulfilled by various fulfillment modules.
2 calls to uc_quote_set_shipping_type()
- uc_quote_nodeapi in shipping/
uc_quote/ uc_quote.module - Implementation of hook_nodeapi().
- uc_quote_taxonomy in shipping/
uc_quote/ uc_quote.module - Implementation of hook_taxonomy().
File
- shipping/
uc_quote/ uc_quote.module, line 887 - The controller module for fulfillment modules that process physical goods.
Code
function uc_quote_set_shipping_type($id_type, $id, $shipping_type) {
db_query("DELETE FROM {uc_quote_shipping_types} WHERE id_type = '%s' AND id = %d", $id_type, $id);
if ($shipping_type !== '') {
db_query("INSERT INTO {uc_quote_shipping_types} (id_type, id, shipping_type) VALUES ('%s', %d, '%s')", $id_type, $id, $shipping_type);
}
}