Skip to content
FULLTime eCommerce

Low Stock & Discount Badge

Stable

Shows an "Only X left" badge when stock is running low and the real discount percentage instead of just the "%" symbol on product tiles in Shopware 6.

Version:
v1.0.0
Compatibility:
SW 6.7

Welcome to Low Stock & Discount Badge for Shopware 6!

Shopware already ships with a "New" badge, a "Topseller" badge, and a plain discount badge on product tiles out of the box. FutiStockBadge closes exactly two gaps that the standard leaves open:

  1. "Only X left" badge for low stock — the standard has no indicator that points out a low available stock. The plugin creates urgency at exactly this point.
  2. Real percentage in the discount badge — the Shopware standard only shows a plain "%" symbol on discounted products. FutiStockBadge replaces it with the actual, rounded discount, e.g. "−20%".

FutiStockBadge is a pure config-only plugin: a single Twig override, no administration build, no data model, no database tables. Installing and activating it is enough.

What can the plugin do?

  • Low stock badge — "Only X left" appears as soon as a product's available stock reaches a configurable threshold
  • Real discount percentage — replaces the standard "%" symbol with the actual, rounded percentage, provided Shopware's conditions for showing the badge are met
  • Configurable color — the background color of the low stock badge is freely selectable
  • Both toggleable independently — the low stock badge and the real percentage can be enabled or disabled independently of each other
  • Configurable per sales channel — all settings follow Shopware's standard plugin configuration behavior
  • Accessible — the discount badge keeps the hidden screen reader text, the percentage itself is aria-hidden

Plugin structure

FutiStockBadge overrides, via sw_extends, only the file @Storefront/storefront/component/product/card/badges.html.twig and adjusts two blocks within it:

  1. component_product_badges_discount — replaces the standard discount badge with the real percentage when the setting is active
  2. component_product_badges_new — calls parent() first, then appends the low stock badge if needed

Since both blocks are part of the existing .product-badges container, the badges automatically appear everywhere Shopware renders product tiles.

  1. Install the plugin
  2. Configure it — check the threshold, color, and discount display
  3. Understand the low stock badge — display condition and availableStock vs. stock
  4. Understand the discount badge — when the real percentage appears
  5. Check the display locations — where the badges become visible in the shop

All chapters of this documentation


If you have any questions or issues, feel free to contact us at support@fulltime-ecommerce.de.

Was this page helpful?

Support

Rented Plugins (Shopware Store)

For support with plugins rented from the Shopware Store, please open a support ticket in your Shopware account.

Create Shopware Ticket

General Inquiries

For general questions or purchase licenses, reach us by email.

Send Email
Low Stock & Discount Badge | FULLTime eCommerce