function hook_order_product_alter in Ubercart 6.2
Allows modules to alter ordered products when they're loaded with an order.
Parameters
&$product: The product object as found in the $order object.
$order: The order object to which the product belongs.
Return value
Nothing should be returned. Hook implementations should receive the $product object by reference and alter it directly.
2 functions implement hook_order_product_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- uc_attribute_order_product_alter in uc_attribute/
uc_attribute.module - Implements hook_order_product_alter().
- uc_product_kit_order_product_alter in uc_product_kit/
uc_product_kit.module - Implements hook_order_product_alter().
3 invocations of hook_order_product_alter()
- uc_order_edit_products in uc_order/
uc_order.admin.inc - Populates the product add/edit div on the order edit screen.
- uc_order_save in uc_order/
uc_order.module - Save an order to the database.
- uc_product_kit_order_product_alter in uc_product_kit/
uc_product_kit.module - Implements hook_order_product_alter().
File
- docs/
hooks.php, line 900 - These are the hooks that are invoked by the Ubercart core.
Code
function hook_order_product_alter(&$product, $order) {
drupal_set_message('hook_order_product_alter(&$product, $order):');
drupal_set_message('&$product: <pre>' . print_r($product, TRUE) . '</pre>');
drupal_set_message('$order: <pre>' . print_r($order, TRUE) . '</pre>');
}