function uc_discounts_ca_condition in Ubercart Discounts (Alternative) 7.2
Same name and namespace in other branches
- 6.2 uc_discounts/uc_discounts.ca.inc \uc_discounts_ca_condition()
Implements hook_ca_condition().
File
- uc_discounts/
uc_discounts.ca.inc, line 11 - Conditional action functions for uc_discounts module.
Code
function uc_discounts_ca_condition() {
$conditions = array();
$conditions['uc_discounts_condition_discount_applied'] = array(
'#title' => t('Check if a discount has been applied to the order'),
'#description' => t('Customer has triggered a valid discount, either through a code or cart products.'),
'#category' => t('Order: Discounts'),
'#callback' => 'uc_discounts_condition_discount_applied',
'#arguments' => array(
'order' => array(
'#entity' => 'uc_order',
'#title' => t('Order'),
),
),
);
$conditions['uc_discounts_condition_total'] = array(
'#title' => t('Check the order total after discounts have been applied'),
'#description' => t('Returns TRUE if the current order total minus any discounts is within the parameters below.'),
'#category' => t('Order'),
'#callback' => 'uc_discounts_condition_total',
'#arguments' => array(
'order' => array(
'#entity' => 'uc_order',
'#title' => t('Order'),
),
),
);
return $conditions;
}