Skip to content

Discounts & Gift Certificates

Menu Location: Discounts (top-level menu, scissors icon)

Last Updated: 2026-07-24


Overview

The Discounts page (admin_discount_codes.php) is where you create and manage discount codes and gift certificates. From here you can create single codes, create a batch of codes with a CSV download, import codes from a file, create gift certificates that email the recipient, clone and retire old codes, and review how each code has been redeemed.

Primary Functions:

  • Create a single discount code (dollar off or percent off)
  • Create a batch of codes and download them as a CSV
  • Import codes from a CSV file
  • Create gift certificates and email the recipient and purchaser
  • Add a free or discounted product to a code (first orders or free for a term)
  • Set BOGO (buy one get one) behavior on a code
  • Restrict eligibility (new customers, off-week customers, etc.)
  • Review who redeemed a code and its revenue history

Page Layout

Top Action Buttons

  • Add Discount Code ... opens the separate add page (admin_discount_codes_add.php)
  • Create Code Batch ... opens the batch creation form
  • Create Gift Certificate ... opens the gift certificate form
  • Import ... opens the CSV import form
  • Clone and Rename (gear icon) ... retires an existing code and re-creates it fresh
  • Auto fill discount code for off-week customers (tag icon) ... sets the "code of the off-week"

Search and Filter

  • Search box ... searches by code text
  • Filter panel (expandable) with:
  • Search notes
  • Filter Promotion
  • Minimum Amount / Maximum Amount
  • Type: Discount Codes, Gift Certificates, Gift Certificates Redeemed, Gift Certificates Not Redeemed

Main Table

Lists codes with these columns:

  • Code
  • Amount (shows the dollar amount, or the percent if it is a percent code)
  • Apply to # Orders
  • Created (added date)
  • Promotion
  • Customer ID (the customer the code is locked to, if any)
  • Redeemed (redemption count, or "by N customers")

  • Expires
  • Notes
  • Limits
  • Status
  • Options: Edit and Delete

Discount Code Types

A code is either a dollar amount off or a percent off. Both are set on the same form; use one or the other, not both. Product offers, BOGO, and free-for-a-term products are additional behaviors you can layer onto a code.

Dollar Amount Discount

Fixed dollar amount off.

Example: $10 off

  • Code: SAVE10
  • Type: dollar
  • Dollar Amount: 10.00

A dollar code scoped to apply only to add-ons is applied live to each order and capped at that order's add-ons subtotal (it cannot discount the box price). Customers see it as "up to $X off add-ons" rather than a fixed credit.

Percentage Discount

Percent off.

Example: 20% off

  • Code: SAVE20
  • Type: Percent
  • Percent: 20

Additional option:

  • Maximum dollar amount to give as a discount (max_dollar_limit_for_percent): caps how large the percent discount can get. 0 means no cap.

Product Offer (free or discounted product)

A code can add a product to the order.

Options on the Add page (Product Offer):

  • No Product Added
  • Added to First Order(s): pick a product, quantity, price (0 = free), and how many orders to add it to
  • Free for Life / 6mo / 1yr (lifetime free product): pick a product, quantity, and lifespan

BOGO (Buy One Get One)

Set on the code edit screen (bogo_hh):

  • This is not a BOGO code
  • Yes, this is a BOGO code
  • Yes, this is a BOGO code for TWO orders

Gift Certificates

Pre-paid credit that becomes a discount code linked to a gift certificate record.

Features:

  • Dollar value
  • Emails a gift notification to the recipient and a receipt to the purchaser
  • Includes a gift message
  • Generates a shareable gift certificate web link
  • Optional: cancel the account when the balance reaches zero and no payment method is on file

Creating Discount Codes

Single Discount Code

Purpose: Create one code.

Steps:

  1. Click Add Discount Code
  2. Fill in:
    • Discount Code: the code customers enter (max 32 characters)
    • Type: dollar (your currency) or Percent
    • Amount: the dollar or percent value
    • Off for ... order(s) (how_many_orders): how many orders the discount applies to
    • Apply discount to: the entire order, only produce (box contents), or only add-ons
  3. Optional:
    • Product Offer: add a product to the first order(s), or free for a term
    • Usage Limits: number of customers that can redeem at signup (qty_available), and who the code is available to (new customers, existing, etc.)
    • Box types allowed: restrict the code to specific box types
    • Codes To Create: leave at 1 for a single code, or enter a number to bulk-create
  4. Save

Additional fields are available when you edit an existing code (see Code Management), including percent max-dollar cap, expiration, last-date-applied, add-ons-only limit, BOGO, and lifetime free product.

Batch Code Creation

Purpose: Generate many unique codes at once and download them as a CSV.

Steps:

  1. Click Create Code Batch
  2. Configure:
    • How many codes to generate
    • Amount (dollar) or Percent
    • Apply to how many orders
    • Promotion (optional)
    • Notes
    • Expires date
    • Limits: apply to entire order, or apply only to produce
    • Number of customers that can redeem (qty_available)
    • Default status: Active or Inactive
  3. Submit. The system generates the codes and provides a CSV download of all of them.

Import Codes

Purpose: Bring in a list of codes from a CSV file.

Steps:

  1. Click Import
  2. Choose the CSV file
  3. Set the properties applied to all imported codes:
    • Amount (dollar)
    • Expires date
    • Promotion (optional)
    • Note
  4. Submit

Creating Gift Certificates

Standard Gift Certificate

Purpose: Create a prepaid gift certificate.

Steps:

  1. Click Create Gift Certificate
  2. Fill in:
    • Purchaser name (gift_name) and purchaser email (gift_email)
    • Recipient name (gift_recipient_name) and recipient email (gift_recipient_email)
    • Gift message
    • Amount (dollar value)
    • Quantity (how many to create)
    • Cancel account when balance reaches $0? (default is no)
  3. Submit

The system creates a gift certificate record, generates a linked discount code, and produces a shareable gift certificate web link. It emails a gift notification to the recipient and a receipt to the purchaser.

Resending Gift Emails

From the gift certificate rows on the list you can:

  • Re-send the gift certificate notification to the recipient
  • Re-send the gift receipt to the purchaser

Gift certificate details are edited on the gift certificate record itself (admin-edit.php?table=gift_certificates).


Code Management

Editing a Code

Click the Edit (wrench) icon on a code row. The edit screen exposes:

  • Code (discount_code)
  • Dollar Amount (amount)
  • Percent (percent) ... use percent or dollar, not both
  • If percent, maximum dollar amount to give (max_dollar_limit_for_percent, 0 = no cap)
  • Apply to how many orders (how_many_orders)
  • Expiration Date (if none is set, it defaults to Dec 31 two years out)
  • Last Date Code will be applied to orders (work_past_expires): optional. Uses the "deliver on" date, so a code can still apply to an order whose deliver-on date is on or before this date
  • Limits (discount_limit): apply to entire order including add-ons, apply only to default box menu contents, or apply only to add-ons
  • If only for add-ons, dollar limit (addons_only_limit, 0 = unlimited)
  • Number of customers that can redeem at signup (qty_available, 0 = unlimited)
  • Status: Active or In-Active
  • Make this code available to (new_customers_only): New customers and reactivations; New customers only; Customers without an order this week; Existing customers, any status; New customers, reactivations AND paused customers
  • Redeemed by (cust_redeemed, auto-set, leave alone)
  • Notes
  • BOGO settings
  • Lifetime Free Product (promotions tag, product, quantity, lifespan)

Changes apply to future use, not to orders already placed.

Applying a Missed Lifetime Free Product Tag

If a code's Lifetime Free Product was configured after customers had already redeemed it, those earlier customers never received the tag and are not getting the bonus product. When the edit screen detects redeemers missing the tag, it shows an "Apply tag to N past redeemer(s) missing it" button above the Lifetime Free Product fields. Clicking it tags those customers and adds the bonus product to their orders already built for the current week; it applies automatically to future orders from then on.

Cloning and Retiring a Code

Purpose: Retire a code and re-create it fresh under the same name.

Steps:

  1. Click Clone and Rename (gear icon)
  2. Select the code to clone
  3. Submit. The original is renamed with a _RETIRED_[date] suffix, and a fresh copy is created under the original name with its redemption tracking reset.

Deactivating or Deleting a Code

  • Deactivate: edit the code and set Status to In-Active
  • Delete: click the Delete icon on the code row

Deactivating preserves the record; deleting removes it.

Converting a Gift Certificate to a Discount Code

On a gift certificate row, there is a link to convert the code into a plain discount code (used when a gift certificate was created by mistake). This unlinks it from the gift certificate record. It cannot be undone.

Code of the Off-Week

The Auto fill discount code for off-week customers tool (tag icon) sets a code (code_of_the_offweek) that is auto-filled for customers who are on an off week.


Tracking & Analytics

The reporting on this page is per-code, reached from the code's edit screen.

Customers Who Redeemed a Code

Reached via the "Customers who redeemed code" button on the edit screen. Lists the customers who redeemed the code. Each row includes a link to remove the code-to-customer link (this does not remove any credit, tag, or balance from the customer account).

An Option dropdown controls what the report shows:

  • Orders after code redeemed (default): each redeemer's order count and revenue from the point they redeemed the code onward (their true post-promo activity)
  • All Orders, no date Range: lifetime order count and revenue for each redeemer
  • First Order Only After Code Applied, Use Date Range: shows only each redeemer's order date within a Start Week / End Week range you pick; the Start/End Week fields only appear for this option

The table's Order Count/Revenue columns and the page's Grand Total adjust to match the selected option. A link to the Revenue History by Week report sits above the Option dropdown and next to the page header.

Revenue History by Week

Reached via the "Revenue History by Week" button on the edit screen. Shows revenue tied to the code by week, with a Grand Total at the top. A link back to the Customers who Redeemed report sits above the week table.

HH Check for Customers with Multiple Codes

A table on the page flags customers who have used multiple codes, showing the customer ID and how many codes they used. This helps catch abuse (for example cancelling and re-activating to reuse discounts).


Advanced Features

Weeks Between Code Usage

To stop customers from cancelling and re-activating to reuse discounts, set a minimum number of weeks between code usage (weeks_between_code_usage config). Set it in the "weeks between code usage" form on the page.

Add-ons Only

Using the Limits setting (or the Apply discount to dropdown when creating a code), a code can apply only to add-ons rather than the whole order. When you do this you can also cap the add-ons discount with the add-ons-only dollar limit.

A dollar code scoped to add-ons only no longer posts a lump account credit. It is applied live per order like a percent code, capped at the order's add-ons subtotal, and shown to the customer as "up to $X off add-ons."

Last Date Code Applied (past expiration)

The Last Date Code will be applied to orders field (work_past_expires) lets a code keep applying to orders whose deliver-on date is on or before that date, even past the expiration date. This is optional; if not set, the expiration date governs.

Product-Specific Offers

A code can add a specific product, either to the first orders (with a set price, 0 = free) or free for a term (life, six months, or one year). Configured on the Add page under Product Offer, and on the edit screen under Lifetime Free Product.


Filters & Search Options

The filter panel (expand "Filter") offers:

  • Search ... code text
  • Search notes ... internal notes text
  • Filter Promotion ... limit to codes in a promotion (or plain discount codes)
  • Minimum Amount / Maximum Amount ... dollar range
  • Type ... Discount Codes, Gift Certificates, Gift Certificates Redeemed, or Gift Certificates Not Redeemed

Export & Download Options

  • Create Code Batch produces a CSV of all the generated codes at creation time.
  • Export on the export form downloads codes, optionally filtered to a promotion.
  • Export to CSV buttons on the list export the current view.

Troubleshooting

Customer says a code does not work

Check:

  1. The code exists and is spelled correctly
  2. Status is Active
  3. The code has not passed its expiration (and last-date-applied, if set)
  4. The redemption cap (qty_available) has not been reached
  5. The customer is eligible under "Make this code available to"
  6. If the code is add-ons only or box-type restricted, the order matches
  7. Weeks-between-code-usage has not blocked a repeat use

Code shows as used but the customer says they did not use it

Check:

  1. Open the code and review "Customers who redeemed code"
  2. Find the linked customer and order
  3. If an order was later cancelled, the code may remain linked. You can remove the code-to-customer link from the redeemed-customers list (this does not touch any credit or balance on the account, which you would adjust separately).

Gift certificate balance not updating

Check:

  1. Was the order completed rather than cancelled?
  2. Confirm the gift certificate's linked discount code was actually applied.
  3. If the order was cancelled, an unchanged balance is expected.

If the balance is still wrong after a completed order, gather the gift certificate ID and order ID before escalating.


  • Gift Certificate record (admin-edit.php?table=gift_certificates) ... edit an individual gift certificate
  • Customer records ... a redeemed code links to the customer that used it

Typical workflow:

  1. Create codes here (single, batch, or import), optionally tied to a promotion
  2. Distribute the codes
  3. Review redemptions and revenue per code from each code's edit screen

Best Practices

Code Creation

  1. Use clear, memorable code names
  2. Set a sensible expiration (if none is set it defaults to Dec 31 two years out)
  3. Use the redemption cap (qty_available) to limit exposure
  4. Add notes for internal reference
  5. Tie to a promotion when you want to group and filter codes

Abuse Prevention

  • Set weeks-between-code-usage so customers cannot cancel and re-activate to reuse discounts
  • Use the eligibility setting (new customers only, etc.) to target the right audience
  • Review the HH check table for customers stacking codes

Quick Reference Card

Task Action/Location
Create a single code Click "Add Discount Code"
Create many codes with a CSV Click "Create Code Batch"
Generate a gift certificate Click "Create Gift Certificate"
Import codes from a file Click "Import", choose a CSV
Find a specific code Use the search box
See who redeemed a code Edit the code, click "Customers who redeemed code"
See a code's revenue Edit the code, click "Revenue History by Week"
Edit a code's amount or expiration Edit the code, change the field, Save
Deactivate a code Edit the code, set Status to In-Active
Delete a code Click the Delete icon on the code row
Clone and retire a code Click "Clone and Rename", select the code
Convert a gift certificate to a discount code Use the convert link on the gift certificate
Re-send a gift email Use the re-send notification / receipt link on the gift certificate row
Set the off-week code Click the tag icon, choose a code

FAQs

What is the difference between a dollar code and a percent code?

A dollar code takes a fixed amount off. A percent code takes a percentage off, and you can cap the maximum dollar value it gives with the "maximum dollar amount to give as a discount" field (0 means no cap). Use one or the other on a code, not both.

How do I limit how many people can use a code?

Set "Number of customers that can redeem this code at signup" (qty_available). 0 means unlimited.

How do I stop customers reusing discounts by cancelling and re-activating?

Set the weeks-between-code-usage value, and review the HH check table for customers who have used multiple codes.

Can I edit a code after customers have used it?

Yes. Changes apply to future use, not to orders already placed.

What happens if I do not set an expiration date?

The expiration defaults to December 31, two years from now.

Can gift certificates cancel a subscription when used up?

Yes. When creating the gift certificate, choose the option to cancel the account when the balance reaches zero and no payment method is on file.


Change Log

2026-08-20

  • Dollar discount codes can now be scoped to apply only to add-ons: they are applied live per order, capped at the order's add-ons subtotal, and shown to the customer as "up to $X off add-ons" instead of a fixed credit
  • The Apply discount to dropdown is now always shown on the Add Discount Code form (in the Conditions section) with three options: entire order, produce only, or add-ons only
  • Add-form cleanup: stacked Product Offer buttons and searchable product pickers

2026-08-11

  • "Customers Who Redeemed a Code" report now defaults to a new "Orders after code redeemed" view showing each redeemer's cumulative order count and revenue since they redeemed the code; the Start/End Week fields now only show for the "First Order Only" option
  • Added cross-links between the "Customers Who Redeemed a Code" report and the "Revenue History by Week" report

2026-07-28

  • Documented the "Apply tag to past redeemer(s) missing it" backfill button on the code edit screen, which fixes a bug where customers who redeemed a code before its Lifetime Free Product was configured never received the free-for-life tag

2026-07-24

  • Rewritten and grounded against admin_discount_codes.php, admin_discount_codes_add.php, and the discount_codes schema
  • Corrected code types, fields, filters, and reporting to match the actual page
  • Removed features the page does not have (status filter, aggregate analytics reports, per-customer usage limit, minimum-order-amount on a code, access-level tiers)

For additional help, contact Kiva Logic support.