Zum Inhalt springen
Shopware 6 Manual

Start and Expiry Date

Expiration date and start date per product: Shopware switches seasonal and promotional stock on and off by itself, hides it and clears the cart. No cron needed.

Version 6.7.4 Compatible with 6.7.11 und neuer 13 min read
On this page

Introduction

Start and Expiry Date gives every product in your shop a time window: you decide from when and until when it may be sold — Shopware switches it on and off again all by itself.

What you achieve with this plugin

  • You plan campaigns ahead: the product goes online at the exact minute you want, without anyone sitting at a screen at night.
  • You end campaigns reliably: once the expiry date has passed, the product disappears from listings, search and cross-selling, and its page is no longer reachable.
  • You do not have to monitor anything: the check runs alongside normal shop traffic, without any extra setup.
  • If you want, your customers can see how long a product is still available — useful pressure for limited-time offers.

Who is this plugin for?

For everyone selling time-limited goods: seasonal and promotional items, pre-orders with a fixed sales start, limited bundles, tickets and appointments, remaining stock with an end date. You need no technical knowledge — everything runs in the Shopware Administration.

Installation

After the purchase, the plugin is already waiting in your Administration — there is nothing to download.

  1. Log in to your Shopware Administration.
  2. Open Extensions → My extensions, tab Apps.
  3. Next to Start and Expiry Date, click Install.
  4. Switch the plugin on using the toggle to the left of the entry — done.

The installed and activated plugin under "My extensions" Fig. 1: The entry “Start and Expiry Date” is installed and the toggle on the left is switched on. On the right you find the version and the Configure link.

If Start and Expiry Date does not appear in the list, your Shopware account is not connected to the shop yet. You can do that under Extensions → My extensions in the Shopware Account tab.

As soon as the plugin is switched on, it creates the time-window fields on all products automatically. There is nothing to prepare.

Getting started

Three steps and your first product has an expiry date:

  1. Open the settings: Extensions → My extensions → click Configure next to Start and Expiry Date.

    The plugin configuration page Fig. 2: The configuration page with the three groups “General”, “Display in the storefront” and “Activation check”.

  2. Check the essentials: At the top, Sales Channel decides which shop your settings apply to. The switch Enable plugin for this sales channel is on by default, so the feature is ready to use right away.

  3. Enter the time window on a product: Open a product under Catalogues → Products, switch to the Specifications tab and enter your time window in the Custom fields area under Start & expiry date (step by step in How to give a product a time window).

  4. Check the result: Call up the product page in your shop. If today’s date is inside the time window, the product looks exactly as before. If it is outside, the link leads to the Page not found page and the product no longer appears in any listing.

Settings

You find the settings via Extensions → My extensions and the Configure link next to Start and Expiry Date.

All settings apply per sales channel. At the top of the page, Sales Channel decides what your entries refer to. All Sales Channels sets the value for the whole shop; pick a single channel and the setting applies only there. Changes take effect once you click Save in the top right corner.

Right inside the General group sits the to documentation button — it opens this manual in your browser.

Enable plugin for this sales channel

Enable plugin for this sales channel decides whether the feature does anything at all in this shop. With the switch off, all products stay untouched: nothing is hidden and no expiry date is shown — not even for products that carry dates. The switch is on by default.

What it is good for: You run several sales channels and want the time control only in your consumer shop, while everything stays permanently visible in your trade shop.

Show expiry date to customers

Show expiry date to customers puts the expiry date in two places: on the product page right below the product number, and in the shopping cart below the matching line item — both in the form “Expiration date: Friday, 18 September 2026”. The switch is off by default, so the time window first works invisibly in the background.

What it is good for: On promotional goods, a visible end date creates urgency. For campaigns you plan internally, leave the switch off — then customers simply notice at some point that the product is gone.

Show expiry date this many days in advance

Show expiry date this many days in advance controls how early the notice appears. Enter 14, for example, and your customers see the date during the last two weeks before expiry. With 0, the notice only appears on the expiry day itself. The setting only has an effect while Show expiry date to customers is switched on.

What it is good for: You do not want to show a far-away date for months, only when it actually matters for the buying decision.

Check interval in seconds (triggered by storefront traffic)

Check interval in seconds (triggered by storefront traffic) sets how often your shop starts a full run at most, switching due products on and off. The run is triggered by ordinary page views of your visitors — no cron job is needed. The default is 60 seconds.

A smaller value switches more precisely but costs slightly more processing time. A larger value takes load off the shop, but a product may stay online a few minutes longer than planned.

What it is good for: For campaigns that must start on the minute (a sales start at 10:00 sharp, say), lower the value. For products where a few minutes do not matter, you can raise it.

How to use the features

How to give a product a time window

What this gives you: You define once from when and until when a product is sold — everything else happens on its own.

Step by step

  1. Open Catalogues → Products and click the product you want.
  2. Switch to the Specifications tab at the top.
  3. Scroll down to the Custom fields area and click the Start & expiry date tab there.
  4. Switch Active on. Only then does the time window apply to this product.
  5. Enter the points in time:
    • Start date: from when the product may be bought. Leave the field empty and the product counts as “available all along”, so only the expiry date matters.
    • Expiry date: until when the product may be bought. Leave the field empty and the window never ends, so only the start date matters.
  6. Click Save in the top right corner.

The time window fields on the product Fig. 3: Tab “Specifications” → “Custom fields” → “Start & expiry date” with the “Active” switch, “Start date” and “Expiry date”.

Important: Both date fields carry the note UTC underneath. Shopware stores and shows these points in time in Coordinated Universal Time. If your shop time is ahead of UTC, enter the time accordingly — for a start at 8:00 local time in Central European Summer Time, enter 06:00. After saving, it is worth checking in the shop once that the timing is right.

Tip: To drop a time window again, simply switch Active off. Your dates stay in place and stop having an effect — handy for campaigns that come back every year.

How to show the expiry date to your customers

What this gives you: Your customers see at a glance how long they can still get the product, which raises the willingness to buy on time-limited goods.

Step by step

  1. Open the plugin settings (see Settings).
  2. At the top, pick the Sales Channel the notice should appear in.
  3. In the Display in the storefront group, switch Show expiry date to customers on.
  4. In Show expiry date this many days in advance, enter how early the notice should appear.
  5. Click Save in the top right corner.

The expiry date on the product page Fig. 4: On the product page, the expiry date sits below the product number.

The notice only appears when all three conditions are met: the product has an expiry date and its Active switch is on, the display is switched on for this sales channel, and the expiry date is close enough in the future.

How to limit the feature to individual sales channels

What this gives you: The same products behave differently across your shops — time-controlled in one, permanently visible in another.

Step by step

  1. Open the plugin settings.
  2. At the top, pick the Sales Channel you want to configure separately.
  3. Switch Enable plugin for this sales channel off if nothing should be hidden there — or adjust just the display settings.
  4. Click Save and repeat for every further channel.

Tip: As long as All Sales Channels is selected, your value applies everywhere. As soon as you set it for a single channel, that channel keeps its own value.

What happens when the time window starts or ends

What this gives you: You know exactly what your shop does — and never have to follow up by hand.

Once the start time is reached, Shopware switches the product on and it appears in your shop as usual. Once the expiry date has passed (or the start time has not been reached yet), this happens:

  • The product is switched off automatically. You can see this on the product in the General tab, in the Visibility & structure area: the switch Active for all selected Sales Channels is then off.
  • It no longer appears in category listings, in the search or in the cross-selling of other products.
  • Its product page is no longer reachable — anyone who saved the link ends up on the Page not found page.

The expired product is set to inactive Fig. 5: After expiry, the switch “Active for all selected Sales Channels” on the product is off — Shopware flipped it itself.

The page of an expired product Fig. 6: A customer opening the link of an expired product sees “Page not found”.

Tip: You can flip the product switch yourself at any time. On the next run, however, the plugin follows the time window again — to override it permanently, switch Active off under Start & expiry date.

Troubleshooting

The product is not switched on or off at the expected time

What causes it: The run is triggered by page views of your visitors and started at most once per configured check interval. In a quiet shop, or with a large interval, the change can therefore arrive a few minutes late. On top of that, the points in time are given in Coordinated Universal Time (UTC).

How to fix it:

  1. Call up any page of your shop — that triggers the check.
  2. Check the value in Check interval in seconds (triggered by storefront traffic) in the settings and lower it for time-critical campaigns.
  3. On the product, check whether Start date and Expiry date hold the intended time in UTC (see the note in How to give a product a time window).

The expiry date does not appear in the shop

What causes it: Usually the display is still switched off, the lead time is too short, or you are looking at the wrong sales channel.

How to fix it:

  1. Open the settings and pick the affected Sales Channel at the top.
  2. Check whether Show expiry date to customers is switched on.
  3. Raise the value in Show expiry date this many days in advance — with 0, the notice only appears on the expiry day.
  4. On the product, check that the Active switch under Start & expiry date is on and an Expiry date is entered.

A product has disappeared although it should be on sale

What causes it: Its start date is probably still in the future, or the expiry date is already in the past.

How to fix it:

  1. Open the product, tab Specifications, area Custom fields, tab Start & expiry date.
  2. Correct Start date or Expiry date — or switch Active off if the product should be on sale permanently.
  3. Save, then call up a page of your shop and wait a moment.

The settings have no effect

What causes it: Either nothing was saved, the wrong sales channel is selected, or the cache is out of date.

How to fix it:

  1. Check the Sales Channel selection at the top of the configuration page and click Save.
  2. Check whether Enable plugin for this sales channel is switched on.
  3. Clear the cache: Settings → System → Caches & indexes.

FAQ

Q: Do I have to set up a cron job or anything else for this?

A: No. The check is triggered by the ordinary page views in your shop. If your shop also runs the usual background processing, Shopware checks regularly on top of that.

Q: What happens to products where I do not enter a time window?

A: Nothing. As long as the Active switch under Start & expiry date is off, the product behaves exactly as before.

Q: Can I set only a start date without an expiry date?

A: Yes. Leave Expiry date empty and the product is released at the start time and stays released. It works the other way round too: only an Expiry date without a Start date.

Q: Why does the displayed time differ from what I entered?

A: Both date fields work in Coordinated Universal Time (UTC), as the UTC note below the fields shows. Local shop time may be ahead of it.

Q: Can I use the feature in one sales channel and not in another?

A: Yes. All settings can be set separately per sales channel — see How to limit the feature to individual sales channels.

Q: Do my customers see the expiry date automatically?

A: No. The display is off by default and has to be switched on with Show expiry date to customers.

Q: Do I lose my dates if I uninstall the plugin?

A: The time windows are attached to the product as custom fields. As long as you keep the user data when uninstalling, they stay in place.

For administrators / technical details

This section is aimed at technical administrators. You do not need it for normal use.

System requirements

  • Shopware: 6.7.11 or newer
  • PHP: 8.2 or newer

The expiry notice in the storefront uses the component system that Shopware only ships from 6.7.11 onwards. On older 6.7 releases the plugin therefore deliberately cannot be installed.

Installation via the command line (Composer)

composer require swp/expirationdate-six
php bin/console plugin:refresh
php bin/console plugin:install SwpExpirationDateSix --activate
php bin/console cache:clear

How the activation run is triggered

Calls to category and product pages trigger the run, at most once per configured check interval; concurrent traffic provably results in exactly one run, not one per visitor. No worker or cron job is required. If the shop runs the usual background processing, a scheduled check every five minutes is added on top.

To trigger the run manually — after a bulk import, for example:

php bin/console expirationdate:cron

If the run changes something, it clears the cache of the affected pages itself; if nothing changes, the cache is left untouched.


This manual was written for Start and Expiry Date version 6.7.4.

Need a team that keeps your shop running?

We have been maintaining Shopware shops for more than 20 years, including updates, hotfixes and the plugins you are configuring right now.

BuI Insights

Shopware- & xentral-Praxiswissen direkt ins Postfach

Plugin-Updates, Best Practices, Migrations-Tipps und Branchen-Cases. Ein Mal im Monat, nur das, was wirklich relevant ist. Jederzeit abbestellbar.

Mit dem Klick stimmst du zu, dass wir dir den Newsletter zusenden dürfen (Art. 6 Abs. 1 lit. a DSGVO). Mehr in der Datenschutzerklärung.