You are here

function commerce_cart_rules_add_to_cart_message in Commerce Core 7

Rules action: displays a the default translatable Add to Cart message.

1 string reference to 'commerce_cart_rules_add_to_cart_message'
commerce_cart_rules_action_info in modules/cart/commerce_cart.rules.inc
Implements hook_rules_action_info().

File

modules/cart/commerce_cart.rules.inc, line 195
Rules integration for shopping carts.

Code

function commerce_cart_rules_add_to_cart_message($product) {
  drupal_set_message(t('%title added to <a href="!cart-url">your cart</a>.', array(
    '%title' => $product->title,
    '!cart-url' => url('cart'),
  )));
}