You are here

function hook_product_class in Ubercart 5

Same name and namespace in other branches
  1. 6.2 docs/hooks.php \hook_product_class()

Perform 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
Implementation of hook_product_class().
uc_cart_condition_product_class in uc_cart/uc_cart_workflow.inc
uc_catalog_product_class in uc_catalog/uc_catalog.module
Implementation of Übercart's hook_product_class.
uc_product_product_class in uc_product/uc_product.module
2 invocations of hook_product_class()
uc_product_class_delete_confirm_submit in uc_product/uc_product.module
Submit handler for uc_product_class_delete_confirm.
uc_product_class_form_submit in uc_product/uc_product.module
Submit handler for uc_product_class_form.

File

docs/hooks.php, line 804
These are the hooks that are invoked by the Übercart 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;
  }
}