> For the complete documentation index, see [llms.txt](https://document.tek-labs.app/free-gift-userguide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://document.tek-labs.app/free-gift-userguide/user-guides/gift-offers/gift-discount-code.md).

# Gift Discount Code

Unlock a free gift when the shopper applies a discount code.

A Gift discount code offer links one or more **existing Shopify discount codes** to gift products. When a shopper applies one of those codes in the cart, the app adds the gifts to the cart (automatically, or lets the shopper choose) and makes them free.

> *Example:* you link the code **GIFTFORYOU** to a tote bag. A shopper enters GIFTFORYOU in the cart: the code's own Shopify discount applies as usual, and the tote bag is added for free.

**Before you start:**

1. Create the discount code in **Shopify admin › Discounts**. Use an **Amount off products** or **Amount off order** code. The app uses the code's name and its product and cart conditions; its other rules are ignored.
2. Turn on the **Discount For Gift** app embed in your theme. See [Enabling Tek Labs app](/free-gift-userguide/getting-started/enabling-tek-labs-app.md).
3. In the app, go to **Offers › Create › Gift by discount code**.

## Step 1 · Offer

<figure><img src="https://2782088585-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyTxhG4dtLtoZ8LGb73m7%2Fuploads%2Fgit-blob-30f3c4e3f7c1e791b53c445b74b6046dbb488693%2Fsp-gdc-offer.png?alt=media" alt="Gift discount code offer step"><figcaption></figcaption></figure>

### Offer information

**Offer name**: for your reference. Below it, a one-line summary reads, for example, "Enter GIFTFORYOU → get Tote bag free".

### Discount codes

* Click **Browse discount codes** to pick one or more existing codes, or **Create in Shopify** to make a new one first.
* The table shows each code's **Discount code**, **Type** and **Condition**. Remove a code with **✕**.
* Any of the linked codes unlocks the gift. Expired codes can't be selected, and you'll see a warning if a linked code expires in Shopify.

### Customer gets

<figure><img src="https://2782088585-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyTxhG4dtLtoZ8LGb73m7%2Fuploads%2Fgit-blob-2104237683e5f8074a87b541c06cbcea2712ae39%2Fsp-gdc-customer-gets.png?alt=media" alt="Customer gets for Gift discount code"><figcaption></figcaption></figure>

* **Auto - Add Gifts** (default): gifts are added to the cart automatically. Under **Auto-add settings** choose:
  * **Add first available product**: adds the first in-stock gift in your list. Set how many with **Number of gift**.
  * **Add all product from the list**: adds every gift, with a quantity for each.
* **Customer choose**: shoppers pick their gift in the cart drawer and cart page with **Fixed product quantity** per gift. Tick **Number of gift** to limit how many different gifts they can choose. The app notes that gift selection at the checkout page is available on the paid plan only.

Select the gift products with **Browse** or the search field.

### Other behaviors

**Limit number of times this discount can be use per order.** By default, each linked code a shopper applies unlocks the gifts again, so two linked codes give twice the gifts. Set a limit to cap the gifts per order.

## Step 2 · Display

<figure><img src="https://2782088585-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyTxhG4dtLtoZ8LGb73m7%2Fuploads%2Fgit-blob-544b448e36609fd85e33ce960c7bb5e70bd7f176%2Fsp-gdc-display.png?alt=media" alt="Choose widget for Gift discount code"><figcaption></figcaption></figure>

All three widgets are on by default:

| Widget                       | What shoppers see                                                             | Where                                                                 |
| ---------------------------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| **Pop Up & Floating button** | A floating button that opens a popup showing the code with a **Copy** button. | **All pages**, or Home, Collection, Product, Cart and Specific pages. |
| **Discount box**             | A code field with an **Apply** button.                                        | **Cart drawer**, **Cart page**.                                       |
| **Gift selector**            | A window to pick gifts when the offer uses Customer choose.                   | **Cart drawer**, **Cart page**, **Checkout page**.                    |

Style these widgets in [Styling › Floating Button & Notification Modal](/free-gift-userguide/user-guides/styling/floating-button-notification-modal-type.md) and [Discount Box & Gift Slider](/free-gift-userguide/user-guides/styling/discount-box-gift-slider-type.md). Edit their texts in the **Discount code** tab of [Translations](/free-gift-userguide/user-guides/translation.md).

## Step 3 · Advanced

<figure><img src="https://2782088585-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyTxhG4dtLtoZ8LGb73m7%2Fuploads%2Fgit-blob-7b6f197f468e8238c03488e8674423b15ea8fc78%2Fsp-gdc-advanced.png?alt=media" alt="Combinations"><figcaption></figcaption></figure>

**Combinations**: choose which discounts the free-gift discount can combine with: **Product discount**, **Order discounts**, **Shipping discounts** (all ticked by default).

{% hint style="warning" %}
For the gift and the shopper's code to apply together, the gift discount must be allowed to combine with the code's discount class, and the Shopify code must also be set to combine with **Product discounts**.
{% endhint %}

## Go live

Save the offer and check the Summary: which codes redeem it, which gifts are given, the per-order limit, the widgets and the combinations. Then use **Activate** or **Schedule**. See [Managing offers](/free-gift-userguide/getting-started/managing-offers.md).

{% hint style="info" %}
Gift discount code offers are not available on restricted development stores.
{% endhint %}
