You are here

function uc_discounts_update_6002 in Ubercart Discounts (Alternative) 6.2

Same name and namespace in other branches
  1. 7.2 uc_discounts/uc_discounts.install \uc_discounts_update_6002()

#919730, Add the ability for a discount to qualify based on subtotal of all products

File

uc_discounts/uc_discounts.install, line 617
Install hooks for uc_discounts.module.

Code

function uc_discounts_update_6002() {
  $schema = uc_discounts_schema();
  $ret = array();
  db_add_field($ret, 'uc_discounts', 'use_only_discounted_products_to_qualify', $schema['uc_discounts']['fields']['use_only_discounted_products_to_qualify']);

  // This was the default before this feature was added
  db_query("UPDATE {uc_discounts} SET use_only_discounted_products_to_qualify=1");
  return $ret;
}