You are here

function hook_commerce_cart_product_add in Commerce Core 7

Rules event hook: allows modules to react to the addition of a product to a shopping cart order.

Parameters

$order: The cart order object the product was added to.

$product: The product that was added to the cart.

$quantity: The quantity of the product added to the cart.

$line_item: The new or updated line item representing that product on the given order.

File

modules/cart/commerce_cart.api.php, line 257
Hooks provided by the Cart module.

Code

function hook_commerce_cart_product_add($order, $product, $quantity, $line_item) {

  // No example.
}