Low Stock & Discount Badge
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:
- "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.
- 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:
component_product_badges_discount— replaces the standard discount badge with the real percentage when the setting is activecomponent_product_badges_new— callsparent()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.
Recommended setup workflow
- Install the plugin
- Configure it — check the threshold, color, and discount display
- Understand the low stock badge — display condition and
availableStockvs.stock - Understand the discount badge — when the real percentage appears
- Check the display locations — where the badges become visible in the shop
All chapters of this documentation
- Installation
- Configuration
- Low stock badge
- Discount badge
- Display locations
- Customizing texts
- Theme compatibility
- Troubleshooting
- Changelog
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