> For the complete documentation index, see [llms.txt](https://help.pixfizz.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.pixfizz.com/ecommerce/pixfizz-ecommerce/shopper-managed-storefront/using-the-promotions-flyout-modal.md).

# Using the Promotions flyout modal

The Promotions flyout is a panel that slides out when a customer clicks a link or button, showing the promotions you currently have running. It is pre-set up on Shopper and can be triggered from anywhere on your site.

***

### Video walkthrough

{% embed url="<https://www.loom.com/share/e41a15d0f6c74e249f0bed6194c818f7>" %}

***

### Overview

The flyout displays any promotions that are currently active, based on their dates. Each promotion can show a name, a message, a promo code, an image, a call to action, and a link to the product or collection you are promoting.

* On **Shopper**, this feature is pre-set up. You only need to add promotions and place a trigger link.
* On a custom Pixfizz storefront, you can build the same solution yourself by creating the Promotions custom type (see the last section).

Promotions only appear in the flyout while their dates are active, so you can prepare them in advance and they will turn on and off automatically.

***

### How to trigger the flyout

The flyout opens from a link. You can place that link anywhere — in the footer, on a page, below a product, or in the cart. It just needs two attributes on the link tag:

* `data-toggle="modal"`
* `href="#modal-promotions"`

Example:

```html
<a href="#modal-promotions" data-toggle="modal">View our current offers</a>
```

You can change the link text to anything you like. As long as both of those attributes are present, clicking the link opens the Promotions flyout.

***

### How to add or edit a promotion

Promotions are managed as entries in the **Promotions** custom type.

1. Go to **Website > Custom Types > Promotions**.
2. Create a new entry, or open an existing one to edit it.
3. Fill in the fields (see the field reference below). At minimum, set an **end date** and the details you want to display.
4. Save.

A promotion shows in the flyout automatically while its dates are active. You do not need to manually turn it on and off.

#### What the flyout shows

For each active promotion, the flyout can display:

* The promotion name and message
* The end date (for example, "Ends Wednesday, July 1st")
* A link straight to the promoted product or collection
* The promo code, with a call to action such as "Use JOURNAL30 at checkout"

Customers can click the promo code to copy it to their clipboard, so it is easy to paste in the cart.

***

### Date format (important)

The start and end dates must be entered in this exact format:

```
YYYY-MM-DD
```

* Four digits for the year, a dash, two digits for the month, a dash, two digits for the day.
* Use leading zeros. Write `06` for June, not `6`, and `01` for the first of the month, not `1`.

Examples:

* `2026-06-01` is the 1st of June 2026.
* `2026-07-01` is the 1st of July 2026.

Do not use formats like `9 May 2026`. The system reads the date in `YYYY-MM-DD` order, and any other format will stop the promotion from working.

#### Start and end dates

* The **end date** is the main requirement. It controls when the promotion stops showing.
* A **start date** is optional. If set, the promotion only begins showing on that date.
* Because dates control visibility, you can pre-create promotions 6 or 12 months ahead and they will appear and disappear on their own.

***

### Promo codes are created separately

The **Code** field on a promotion only displays the code text in the flyout (for example, `JOURNAL30`). It does not create the discount itself.

You must create the actual discount code separately so it works at checkout. Set up the discount, then enter its code into the promotion's Code field so the two match.

***

### Field reference

| Field               | What it is for                                                                |
| ------------------- | ----------------------------------------------------------------------------- |
| Promo start date    | Optional. When the promotion starts showing. Format `YYYY-MM-DD`.             |
| Promo end date      | Required. When the promotion stops showing. Format `YYYY-MM-DD`.              |
| Name                | The promotion name shown in the flyout.                                       |
| Message             | The descriptive text shown in the flyout.                                     |
| Code                | The promo code to display. Must match a discount code you created separately. |
| Image               | Optional image to show with the promotion.                                    |
| Tags                | Optional tags for the promotion.                                              |
| Call to action text | The text on the call to action.                                               |
| Promo link          | Link to the product or collection being promoted.                             |

***

### Setting up the Promotions custom type from scratch

This is only needed on a custom storefront, or if your Shopper site does not already have the Promotions custom type.

1. Go to **Website > Custom Types**.
2. If a Promotions custom type already exists, you are done. If not, add a new custom type.
3. Set the custom type **code** to exactly `Promotions`. This must match exactly, because the flyout code looks for it by that code.
4. Once created, add the custom fields listed in the field reference above. You can either add them by editing the schema, or import them from the reference file available in this documentation.

***

### Tips

* Place the trigger link where customers will see it, so they know what is on offer right now.
* Pre-build seasonal promotions ahead of time and let the dates switch them on and off.
* Always double-check the date format before saving. A wrongly formatted date is the most common reason a promotion does not appear.

***

### Related

* Discount codes
* Custom Types
