function commerce_cart_rules_event_info in Commerce Core 7
Implements hook_rules_event_info().
File
- modules/
cart/ commerce_cart.rules.inc, line 14 - Rules integration for shopping carts.
Code
function commerce_cart_rules_event_info() {
$events = array();
$events['commerce_cart_product_prepare'] = array(
'label' => t('Before adding a product to the cart'),
'group' => t('Commerce Cart'),
'variables' => commerce_cart_rules_event_variables(),
'access callback' => 'commerce_order_rules_access',
);
$events['commerce_cart_product_add'] = array(
'label' => t('After adding a product to the cart'),
'group' => t('Commerce Cart'),
'variables' => commerce_cart_rules_event_variables(TRUE),
'access callback' => 'commerce_order_rules_access',
);
$events['commerce_cart_product_remove'] = array(
'label' => t('After removing a product from the cart'),
'group' => t('Commerce Cart'),
'variables' => commerce_cart_rules_event_variables(TRUE),
'access callback' => 'commerce_order_rules_access',
);
return $events;
}