function hook_commerce_cart_product_prepare in Commerce Core 7
Rules event hook: allows modules to operate prior to adding a product to the cart but does not actually allow you to interrupt the process.
Invoking this Rules event / hook does not result in the processing of any return value, so it is not useful for interrupting a cart product add operation outside of a redirect.
Parameters
$order: The cart order object the product will be added to.
$product: The product being added to the cart.
$quantity: The quantity of the product to add to the cart.
File
- modules/
cart/ commerce_cart.api.php, line 240 - Hooks provided by the Cart module.
Code
function hook_commerce_cart_product_prepare($order, $product, $quantity) {
// No example.
}