function commerce_ss_rules_condition_info in Commerce Stock 7.2
Implements hook_rules_condition_info().
File
- modules/
commerce_ss/ commerce_ss.rules.inc, line 11 - Rules integration for Commerce Simple Stock.
Code
function commerce_ss_rules_condition_info() {
$conditions = array();
$conditions['commerce_ss_stock_enabled_on_product'] = array(
'label' => t('Product has simple stock enabled for its type'),
'parameter' => array(
'commerce_product' => array(
'type' => 'commerce_product',
'label' => t('product'),
),
),
'group' => t('Commerce Stock (ss)'),
'callbacks' => array(
// @todo add a function that also checked that the "Disable stock
// for this product" is not on or maybe add another condition form.
'execute' => 'commerce_ss_product_enabled',
),
);
$conditions['commerce_ss_stock_not_disabled'] = array(
'label' => t('Product simple stock is not disabled by an override'),
'parameter' => array(
'commerce_product' => array(
'type' => 'commerce_product',
'label' => t('product'),
),
),
'group' => t('Commerce Stock (ss)'),
'callbacks' => array(
// @todo add a function that also checked that the "Disable stock for
// this product" is not on or maybe add another condition form.
'execute' => 'commerce_ss_product_not_disabled_by_override',
),
);
return $conditions;
}