You are here

function commerce_stock_rules_event_variables in Commerce Stock 7.2

Returns a variables array for stock check event.

1 call to commerce_stock_rules_event_variables()
commerce_stock_rules_event_info in ./commerce_stock.rules.inc
Implements hook_rules_event_info().

File

./commerce_stock.rules.inc, line 48
Rules integration for Commerce Stock.

Code

function commerce_stock_rules_event_variables() {
  $variables = array(
    'commerce_product' => array(
      'label' => t('Product'),
      'type' => 'commerce_product',
    ),
    'stock_requested_quantity' => array(
      'label' => t('Requested Quantity'),
      'type' => 'decimal',
    ),
    'stock_already_ordered' => array(
      'label' => t('Quantity already ordered (in the cart)'),
      'type' => 'decimal',
    ),
    'stock_requested_total' => array(
      'label' => t('Quantity requested + already ordered'),
      'type' => 'decimal',
    ),
  );
  return $variables;
}