function hook_product_class in Ubercart 6.2
Same name and namespace in other branches
- 5 docs/hooks.php \hook_product_class()
Performs actions on product classes.
Parameters
$type: The node type of the product class.
$op: The action being performed on the product class:
- insert: A new node type is created, or an existing node type is being converted into a product type.
- update: A product class has been updated.
- delete: A product class has been deleted. Modules that have attached additional information to the node type because it is a product type should delete this information.
4 functions implement hook_product_class()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- uc_attribute_product_class in uc_attribute/
uc_attribute.module - Implements hook_product_class().
- uc_cart_condition_product_class in uc_cart/
uc_cart.ca.inc - Check that an order has a product of the selected class.
- uc_catalog_product_class in uc_catalog/
uc_catalog.module - Implements hook_product_class().
- uc_product_product_class in uc_product/
uc_product.module - Implements hook_product_class().
2 invocations of hook_product_class()
- uc_product_class_delete_confirm_submit in uc_product/
uc_product.admin.inc - Form submission handler for uc_product_class_delete_confirm().
- uc_product_class_form_submit in uc_product/
uc_product.admin.inc - Form submission handler for uc_product_class_form().
File
- docs/
hooks.php, line 1150 - These are the hooks that are invoked by the Ubercart core.
Code
function hook_product_class($type, $op) {
switch ($op) {
case 'delete':
db_query("DELETE FROM {uc_class_attributes} WHERE pcid = '%s'", $type);
db_query("DELETE FROM {uc_class_attribute_options} WHERE pcid = '%s'", $type);
break;
}
}