You are here

function commerce_multicurrency_rules_event_info in Commerce Multicurrency 7

Implements hook_rules_event_info().

File

./commerce_multicurrency.rules.inc, line 10
Commerce Multicurrency rules integration.

Code

function commerce_multicurrency_rules_event_info() {
  $events = array();
  $events['commerce_multicurrency_user_currency_set'] = array(
    'label' => t('After the user currency has been set'),
    'group' => t('Commerce Multicurrency'),
    'variables' => array(
      'currency_code' => array(
        'type' => 'text',
        'label' => t('The currency code to use'),
      ),
      'old_currency_code' => array(
        'type' => 'text',
        'label' => t('The currency code used before'),
      ),
    ),
    'access callback' => 'commerce_order_rules_access',
  );
  $events['commerce_multicurrency_set_display_price'] = array(
    'label' => t('Set the display price'),
    'group' => t('Commerce Multicurrency'),
    'variables' => array(
      'commerce_line_item' => array(
        'label' => t('Product line item'),
        'type' => 'commerce_line_item',
        'skip save' => TRUE,
      ),
      'field_name' => array(
        'type' => 'text',
        'label' => t('The name of the handled price field.'),
        'skip save' => TRUE,
      ),
    ),
    'access callback' => 'commerce_order_rules_access',
  );
  return $events;
}