You are here

function uc_discounts_discount_type_options in Ubercart Discounts (Alternative) 7.2

Returns an options list array of discount types with descriptions.

@staticvar null $options

Return value

array

2 calls to uc_discounts_discount_type_options()
uc_discounts_admin_discount_edit_form in uc_discounts/uc_discounts.admin.inc
Generates admin form to create or edit a discount.
uc_discounts_discount_type_name in uc_discounts/uc_discounts.module
Get a discount type name using discount type constant.

File

uc_discounts/uc_discounts.module, line 2434

Code

function uc_discounts_discount_type_options() {
  static $options = NULL;
  if (is_null($options)) {
    $options = array(
      UC_DISCOUNTS_DISCOUNT_TYPE_PERCENTAGE_OFF => t("Percentage off"),
      UC_DISCOUNTS_DISCOUNT_TYPE_PERCENTAGE_OFF_PER_QUALIFYING_ITEM => t("Percentage off per qualifying item"),
      UC_DISCOUNTS_DISCOUNT_TYPE_FIXED_AMOUNT_OFF => t("Fixed amount off"),
      UC_DISCOUNTS_DISCOUNT_TYPE_FIXED_AMOUNT_OFF_PER_QUALIFYING_ITEM => t("Fixed amount off per qualifying item"),
      UC_DISCOUNTS_DISCOUNT_TYPE_FREE_ITEMS => t("Free items"),
    );
  }
  return $options;
}