You are here

function uc_discounts_update_6003 in Ubercart Discounts (Alternative) 7.2

Same name and namespace in other branches
  1. 6.2 uc_discounts/uc_discounts.install \uc_discounts_update_6003()

Issue #1100790: Add the ability for a discount max applications to be limited to number of required products in the cart.

File

uc_discounts/uc_discounts.install, line 572
Install, update, and uninstall functions for uc_discounts module.

Code

function uc_discounts_update_6003() {
  $limit_max__times_applied_schema = array(
    'type' => 'int',
    'size' => 'tiny',
    'not null' => TRUE,
    'default' => 0,
    'description' => t('Whether or not to further limit the maximum times applied to the number of qualifying products.'),
  );
  db_add_field('uc_discounts', 'limit_max_times_applied', $limit_max__times_applied_schema);
  db_update('uc_discounts')
    ->fields(array(
    'required_product' => '',
  ))
    ->condition('required_product', 'none')
    ->execute();
}