SteelCode
steelcode.dev
Product Expiration Date

Configuration

Configure expiry emails, storefront badge thresholds, and global fallback discounts.

Configuration

Open Extensions → My extensions → Product expiration date → Configure. Configure the global settings before assigning dates to products. Product-specific settings are explained in Product setup and discounts.

Global settings are fallbacks. A product still needs its own expiration date and must be enabled in the Expiration date product tab before the plugin processes it.

First-time setup checklist

  1. Decide whether the shop should show expiration information in listings, cart, and checkout.
  2. Configure the warning and critical badge periods.
  3. If you want to reduce prices before expiry, enable and configure global discount rules.
  4. If you need internal reminders, enable email notifications, add recipients, and choose notification periods.
  5. Confirm that scheduled tasks and a Messenger worker run in production. Without them, automatic deactivation and queued emails are not processed.

Email notifications

Enable Email notifications to activate the plugin's internal reminders. Add one or more recipient addresses using the tag field. These addresses receive the emails; the plugin does not send them to the current Administration user or the customer.

Choose one or more Notify before expiration periods. Each selected period can send one notification per eligible product. For example, selecting 1 month, 14 days, and 7 days can result in three separate reminders as the product reaches each point.

For a notification to be sent, all of the following must be true:

  • Global Email notifications are enabled.
  • At least one valid recipient address is configured.
  • The product has an expiration date and its Active switch is enabled.
  • Notify via email is enabled in the product's Expiration date tab.
  • The scheduled task has queued the message and a Messenger worker has processed it.

The plugin records successful notifications per expiration date and period, so the same reminder is not sent repeatedly. Changing a product's expiration date starts a new notification cycle.

Deactivation email

The deactivation email is separate from pre-expiry reminders. It can be sent when the date has been reached and Automatic deactivation is enabled for the product. It does not depend on selecting a pre-expiry period, but it still requires global email notifications, recipients, and Notify via email for the product.

Storefront badges

The badge settings determine the status of compact expiration indicators in the storefront:

  • Success: the product is outside the warning period.
  • Warning: the expiration date is within the configured warning period but outside the critical period.
  • Critical: the expiration date is within the configured critical period.

Use the same predefined periods as the discount rules. The critical period should normally be shorter than the warning period; for example, warning from 1 month and critical from 7 days. The plugin uses Shopware's standard success, warning, and danger colours.

Storefront expiration dates

Use Show expiration date in product listings to show the compact indicator on product cards. Use Show expiration date in cart and checkout to show it below eligible cart and checkout line items.

The indicator is displayed only when the product has:

  • a date of expiration;
  • Active enabled in the product tab;
  • Preview on storefront enabled in the product tab; and
  • the relevant global display option enabled.

The product detail page uses the same product-level eligibility rules. It is not controlled by the listing or cart/checkout visibility switches.

Global expiry discounts

Enable Global expiry discounts to define fallback discounts for products that do not have active product-specific rules. Configure each row with a period and percentage. A percentage of 0 keeps the row inactive in practice.

Example configuration:

Period before expiryDiscount
1 month10%
14 days20%
7 days30%

When several rules are eligible, the rule closest to the expiration date wins. With five days remaining, the 7-day rule is used instead of the 14-day or one-month rule. Product-specific rules always take precedence over global fallback rules. If a product has at least one active product rule, global rules are not used for that product.

Discounts are calculated from the original product price and shown using Shopware's regular-price and discounted-price presentation. The final price is recalculated in cart and checkout.