function uc_discounts_update_6002 in Ubercart Discounts (Alternative) 7.2
Same name and namespace in other branches
- 6.2 uc_discounts/uc_discounts.install \uc_discounts_update_6002()
Issue #919730: Add the ability for a discount to qualify based on subtotal of all products.
File
- uc_discounts/
uc_discounts.install, line 550 - Install, update, and uninstall functions for uc_discounts module.
Code
function uc_discounts_update_6002() {
$use_only_discounted_products_to_qualify_schema = array(
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
'description' => t('Calculate the order subtotal using only discounted products.'),
);
db_add_field('uc_discounts', 'use_only_discounted_products_to_qualify', $use_only_discounted_products_to_qualify_schema);
// This was the default before this feature was added.
db_update('uc_discounts')
->fields(array(
'use_only_discounted_products_to_qualify' => 1,
))
->execute();
}