function uc_coupon_rules_condition_info in Ubercart Discount Coupons 7.3
Same name and namespace in other branches
- 7.2 uc_coupon.rules.inc \uc_coupon_rules_condition_info()
Implements hook_rules_condition_info().
File
- ./
uc_coupon.rules.inc, line 21 - Rules integration for uc_coupon
Code
function uc_coupon_rules_condition_info() {
$conditions['uc_coupon_condition_order_has_coupon'] = array(
'label' => t('Check if an order has a coupon applied'),
'group' => t('Order'),
'parameter' => array(
'order' => array(
'type' => 'uc_order',
'label' => t('Order'),
'optional' => TRUE,
'default value' => NULL,
'allow null' => TRUE,
),
'codes' => array(
'type' => 'list<text>',
'label' => t('Codes'),
'description' => t('Enter coupon codes that this condition will apply to, one per line. Wildcards are allowed, e.g. COUPON* will match all codes beginning with COUPON. Leave blank to apply to any order with a coupon.'),
'restriction' => 'input',
),
),
);
$conditions['uc_coupon_condition_is_bulk'] = array(
'label' => t('Check if a coupon is a bulk coupon'),
'group' => t('Coupon'),
'parameter' => array(
'coupon' => array(
'type' => 'uc_coupon',
'label' => t('Coupon'),
),
),
);
return $conditions;
}