You are here

function hook_uc_product_class in Ubercart 7.3

Performs actions on product classes.

Parameters

$type: The node type of the product class.

string $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.
3 functions implement hook_uc_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_uc_product_class in uc_attribute/uc_attribute.module
Implements hook_uc_product_class().
uc_catalog_uc_product_class in uc_catalog/uc_catalog.module
Implements hook_uc_product_class().
uc_product_uc_product_class in uc_product/uc_product.module
Implements hook_uc_product_class().
2 invocations of hook_uc_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

uc_product/uc_product.api.php, line 61
Hooks provided by the Product module.

Code

function hook_uc_product_class($type, $op) {
  switch ($op) {
    case 'delete':
      db_delete('uc_class_attributes')
        ->condition('pcid', $type)
        ->execute();
      db_delete('uc_class_attribute_options')
        ->condition('pcid', $type)
        ->execute();
      break;
  }
}