--- uc_product.module.orig	2009-10-16 15:14:50.000000000 -0400
+++ uc_product.module	2009-10-16 15:27:16.000000000 -0400
@@ -630,15 +630,20 @@ function uc_product_validate($node) {
       form_set_error('default_qty', t("Adding negative items to the cart doesn't make sense, so don't make it easy."));
     }
   }
+
+  module_invoke_all('uc_product_alter', 'validate', $node);
 }
 
 /**
  * Implementation of hook_insert().
  */
 function uc_product_insert($node) {
+  module_invoke_all('uc_product_alter', 'insert', $node);
+
   if (!isset($node->unique_hash)) {
     $node->unique_hash = md5($node->vid . $node->nid . $node->model . $node->list_price . $node->cost . $node->sell_price . $node->weight . $node->weight_units . $node->dim_length . $node->dim_width . $node->dim_height . $node->length_units . $node->pkg_qty . $node->default_qty . $node->shippable . time());
   }
+
   db_query("INSERT INTO {uc_products} (vid, nid, model, list_price, cost, sell_price, weight, weight_units, length, width, height, length_units, pkg_qty, default_qty, unique_hash, ordering, shippable) VALUES (%d, %d, '%s', %f, %f, %f, %f, '%s', %f, %f, %f, '%s', %d, %d, '%s', %d, %d)",
     $node->vid, $node->nid, $node->model, $node->list_price, $node->cost, $node->sell_price, $node->weight, $node->weight_units, $node->dim_length, $node->dim_width, $node->dim_height, $node->length_units, $node->pkg_qty, $node->default_qty, $node->unique_hash, $node->ordering, $node->shippable
   );
@@ -648,6 +653,9 @@ function uc_product_insert($node) {
  * Implementation of hook_update().
  */
 function uc_product_update($node) {
+
+  module_invoke_all('uc_product_alter', 'update', $node);
+
   if ($node->revision) {
     db_query("INSERT INTO {uc_products} (vid, nid, model, list_price, cost, sell_price, weight, weight_units, length, width, height, length_units, pkg_qty, default_qty, unique_hash, ordering, shippable) VALUES (%d, %d, '%s', %f, %f, %f, %f, '%s', %f, %f, %f, '%s', %d, %d, '%s', %d, %d)",
       $node->vid, $node->nid, $node->model, $node->list_price, $node->cost, $node->sell_price, $node->weight, $node->weight_units, $node->dim_length, $node->dim_width, $node->dim_height, $node->length_units, $node->pkg_qty, $node->default_qty, $node->unique_hash, $node->ordering, $node->shippable
@@ -664,13 +672,18 @@ function uc_product_update($node) {
  * Implementation of hook_load().
  */
 function uc_product_load(&$node) {
-  return db_fetch_object(db_query('SELECT model, list_price, cost, sell_price, weight, weight_units, length, width, height, length_units, pkg_qty, default_qty, unique_hash, ordering, shippable FROM {uc_products} WHERE vid = %d', $node->vid));
+  $product = db_fetch_object(db_query('SELECT model, list_price, cost, sell_price, weight, weight_units, length, width, height, length_units, pkg_qty, default_qty, unique_hash, ordering, shippable FROM {uc_products} WHERE vid = %d', $node->vid));
+  module_invoke_all('uc_product_alter', 'load', $product);
+
+  return $product;
 }
 
 /**
  * Implementation of hook_delete().
  */
 function uc_product_delete(&$node) {
+  module_invoke_all('uc_product_alter', 'delete', $node);
+
   db_query("DELETE from {uc_products} WHERE nid = %d", $node->nid);
 }
 
