User Guide | Discounts

Discounts can be setup on items and summary columns that are only activated when a set of highly configurable conditions are met.

Below is a compiled list of functions related to the cart discounts.

Discount User Guide Index

Discount Config | Get Discount Session Data | Get Discount Helper Data | Set Discount Session Data | Discount Admin Data

Discount Configuration

Customise the configuration of the discount database tables via the config file.

Discount Config. File Settings

Getting Data

Get data from the carts session or database.
Discount Data
  • discount_codes()
    Returns an array of discount codes applied to the cart.
  • excluded_discounts()
    Returns an array of discounts that have been excluded from being applied to the cart.

Discount Item Data

Discount Summary Data

Database / Helper Data

Setting Data

Set data to the carts session data.
Discount Data
  • set_discount()
    Set discount data to the cart, using manually submitted values.
  • set_discount_codes()
    Set discount codes to the cart, using manually submitted values.
  • update_discount_codes()
    Set discount codes to the cart, using manually submitted values, and remove any applied discount codes that are not submitted.
  • unset_discount()
    Remove any discounts or reward vouchers by their id or code.
  • unset_excluded_discounts()
    Re-enables all discounts and reward vouchers that have be excluded from being applied to the cart.

Admin Data

Run database management functions.
Discount Management Functions

Discount Table CRUD Functions

Discount Group Table CRUD Functions

Discount Group Item Table CRUD Functions

Discount Meta Table CRUD Functions