# DataFirefly Advent Calendar: advent calendar for PrestaShop

> Installation Install the module from Modules > Module Manager > Upload a module by sending the ZIP file, or copy the dfadventcalendar folder into the /modules/ directory of your store…

- Page: <https://www.datafirefly.com/en/documentation/dfadventcalendar/>
- Language: en
- Last updated: 2026-09-30
- Other languages: [fr](https://www.datafirefly.com/documentation/dfadventcalendar/index.md), [es](https://www.datafirefly.com/es/documentation/dfadventcalendar/index.md), [de](https://www.datafirefly.com/de/documentation/dfadventcalendar/index.md), [it](https://www.datafirefly.com/it/documentation/dfadventcalendar/index.md), [pl](https://www.datafirefly.com/pl/documentation/dfadventcalendar/index.md), [nl](https://www.datafirefly.com/nl/documentation/dfadventcalendar/index.md), [pt](https://www.datafirefly.com/pt/documentation/dfadventcalendar/index.md)
- Index: <https://www.datafirefly.com/en/documentation/llms.txt>

## Installation

Install the module from **Modules > Module Manager > Upload a module** by sending the ZIP file, or copy the `dfadventcalendar` folder into the `/modules/` directory of your store and click Install.

Installation creates the module tables, registers its hooks and adds the **Catalog > Discounts > Advent calendar** tab. Images uploaded for doors are stored in `/img/dfadventcalendar/`, outside the module folder, so they survive updates.

## Module settings and cron task

The module configuration page (Configure button in the Module Manager) holds three settings and the cron URL.

### Calendar page address

Last part of the calendar URL, shared by all languages (PrestaShop adds the language prefix, for example /fr/). The default depends on the shop's main language: `/advent-calendar` in English, `/calendrier-de-l-avent` in French, `/adventskalender` in German. Friendly URLs must be enabled in PrestaShop.

### Daily reminder: cron task

Reminder emails are sent by a cron task. Copy the URL shown and schedule it every 15 minutes in your hosting panel, for example:

```
*/15 * * * * curl -s "https://www.your-store.com/module/dfadventcalendar/cron?token=YOUR_TOKEN" > /dev/null
```

On each call, the module sends the day's reminders from the hour set on the calendar, in batches (150 by default, set in "Reminders per cron run"). Each participant gets at most one reminder per day, and only if they have not opened today's door yet. The last run date is shown under the URL; "Generate a new cron token" makes the old URL stop working.

The calendar works without cron. Only reminder emails depend on it. The dashboard shows an alert if the cron has not run in the last 24 hours.

## Create a calendar

Open **Catalog > Discounts > Advent calendar** and click **New calendar**.

### Dates and doors

- **Date of the first door**: door 1 opens at midnight that day, in the shop time zone, then one door per day.
- **Number of doors**: 24 for a classic calendar, 25 to include Christmas day, from 1 to 31.
- **Allow opening past doors**: a participant who missed a day can catch up until the end of the calendar.

On save, the module creates the empty doors. They stay closed until you configure and activate them.

### Look

Five looks are available: Fir forest, Kraft paper, Frost, Winter night and Candy cane. **Custom colors** unlocks four colours (background, text, doors, accent). You can add a background image (JPG, PNG or WebP, 5 MB max), falling snow, shuffled doors and varied door sizes.

With varied sizes, the module decides which doors are wide or large so that the grid fills without gaps on 6, 4 or 3 columns depending on the screen. The last door is always the largest.

### Participation

- **Email required to open the doors**: when disabled, visitors open doors freely, but personal codes remain reserved for registered participants.
- **Confirm the email address** (double opt-in): participants click a link received by email before opening doors. Recommended against fake addresses.
- **Newsletter checkbox**: adds an optional, unticked checkbox. Subscription goes through the native customer newsletter or the ps_emailsubscription module if installed.
- **Consent text**: shown next to the mandatory checkbox. Add a link to your privacy policy.

### Reminders

Enable the **Daily reminder email** and choose the **Reminder time**. Participants can turn reminders off from the calendar page or from the link in every email.

### Home page banner

The banner is shown on the home page during the calendar and, if you wish, a few days before with a countdown. To place it elsewhere in your theme, add `{hook h='displayDfAdventCalendar'}` to a template.

## Configure the doors

From the calendar dashboard, click **Doors**, then Edit on each door.

### Door types

- **Message**: text and image.
- **Discount code**: the code is featured in the opening window.
- **Product revealed**: product card with price and add to cart button. Search the product by name or reference.

The **Teaser for the reminder email** is the line sent in the day's reminder: make people want to click without revealing the surprise.

### Reward

Percentage discount, amount discount (tax included, default currency), free shipping or free gift product, with an optional minimum order amount. For a product door, "Apply the discount to the revealed product only" limits the code to that product.

### Code type

- **Personal code**: a single-use cart rule is generated when the participant opens the door. It is linked to their customer account when known, and valid until midnight on the opening day plus the extra validity you chose.
- **Same code for everyone**: one cart rule per door, created and synced by the module. Leave the field empty for an automatic code (prefix, year and door number, for example `ADVENT26-07`), or type your own. Validity counts from the door date.

No time to set up 24 doors? On the dashboard, **Fill the empty doors** applies a ready-made plan: 10 to 20 percent off and free shipping in turn, 25 percent on the last door, personal codes valid one extra day. Texts are written in every shop language. Doors you already configured are not changed.

## Preview before launch

The **Preview** button on the dashboard opens the calendar as it will look on a given day, and the eye icon on each row opens that day's door directly. In preview, codes are examples and nothing is saved. The page is not indexed.

**More > Send me the test emails** sends the three emails (reminder, welcome, confirmation) to the logged-in employee, in their language.

## What customers see

- A countdown to the next door and, for participants, a progress bar.
- Today's door highlighted. Doors open in 3D, with confetti the first time. Animations are turned off for visitors who ask for reduced motion.
- An **Add to my cart** button under each code. If the cart is empty, the code is kept for 14 days and applied with the first product added.
- The **Your codes** summary under the grid, with each code's validity and status (used, expired).
- A share button for the calendar and a link in the customer account.

A registered participant who types their address again receives a sign-in link by email: the module never signs someone in from a typed address alone.

## Final prize draw

In the calendar settings, **Final draw** sets the minimum number of doors opened to take part (0 disables the draw), and **Prize of the final draw** describes the prize shown on the calendar.

The Final draw panel on the dashboard shows how many participants are eligible. **Draw a winner** picks at random among eligible confirmed participants, excluding previous winners. Each draw is logged with the email, doors opened, number of eligible participants and date.

A prize draw falls under contest regulations in most countries. Publish the rules on your store before launch.

## Dashboard and statistics

The dashboard shows participants, confirmed participants, active reminders, newsletter opt-ins, orders placed with a code and revenue excluding tax. For each door: openings, orders and revenue. Participants can be exported to CSV from the Participants list.

**More > Duplicate for next year** copies the calendar with its doors, texts and images, moves the date forward one year and leaves it inactive, without participants or codes.

When Google Tag Manager is present, the module pushes these events to the `dataLayer`: `dfadv_join`, `dfadv_door_open`, `dfadv_code_copy`, `dfadv_code_apply` and `dfadv_share`.

## Emails

Three templates are provided in eight languages in `mails/`: `dfadvent_reminder` (reminder), `dfadvent_confirm` (confirmation and sign-in link) and `dfadvent_welcome` (welcome). To customise them without losing changes on update, copy them to `themes/your-theme/modules/dfadventcalendar/mails/`.

## Personal data

- The consent checkbox is mandatory; the newsletter checkbox is separate and unticked.
- Every reminder email includes a one-click unsubscribe link.
- IP addresses are only stored hashed, to limit sign-ups to 5 per hour per connection.
- The module answers PrestaShop personal data export and deletion requests.

## Troubleshooting

### Reminders are not sent

Check the last cron run date in the module configuration, that reminders are enabled on the calendar and that the reminder time has passed. Only confirmed participants who have not opened today's door receive a reminder. Test sending with "Send me the test emails".

### The calendar page returns a 404 error

Check that friendly URLs are enabled, then clear the PrestaShop cache. If the address clashes with a CMS page or a category, change it in the module configuration.

### The code is not added to the cart

The message shown comes from PrestaShop: minimum order not reached, expired code, or a personal code linked to a customer account while the customer is logged out. In that last case, the code is kept and applied to the next cart once the customer is logged in.

### A door stays closed on its day

Doors open at midnight in the shop time zone (International > Localization > Configuration). Also check that the door is active: a door that has not been configured stays closed.

## Compatibility

- PrestaShop 8.0 to 9.x, one ZIP for both versions.
- Classic, Hummingbird and child themes.
- Multistore and multilingual.
- ModuleAdminController architecture, no Composer dependencies.
- Module translated into English, French, Spanish, German, Italian, Dutch, Polish and Portuguese.
