The stock badge shows the stock of a product – in the product box on listing pages and on the product page (gallery or buybox).
Configuration
Theme configuration
Listing pages
- Go to the "Listing pages" tab
- Expand the "Product badges (in the product box)" block
- Scroll to the section "Badge: Stock badge"
- Enable the configuration "Show stock badge"
- Save your changes after editing
Product pages
- Go to the "Product pages" tab
- Expand the "Product badges (in the image gallery or buy box)" block
- Scroll to the section "Badge: Stock badge"
- Set the configuration "Show stock badge" to "show in the image gallery" or "show in the buy box"
- Save your changes after editing
Note: The badge is displayed if the stock badge is enabled – permanently or only above/below the thresholds, depending on the selected mode (see Options).
Options
You control the display mode and the thresholds in the "Content" tab:
Tab "Content" => Block "Product badges" => Section "Badge: Stock badge"
- Mode
- "Show stock above/below the threshold": The badge only appears for low stock (below "Threshold (low stock)") or high stock (above "Threshold (high stock)").
- "Always show stock": The current stock is shown regardless of the thresholds.
- Threshold (low stock) / Threshold (high stock): Limits for the "above/below the threshold" mode.
Summary
Theme configuration
- Tab "Listing pages" => Block "Product badges (in the product box)" => Section "Badge: Stock badge" => Show stock badge
- Tab "Product pages" => Block "Product badges (in the image gallery or buy box)" => Section "Badge: Stock badge" => Show stock badge
- Tab "Content" => Block "Product badges" => Section "Badge: Stock badge" => Mode
- Tab "Content" => Block "Product badges" => Section "Badge: Stock badge" => Threshold (low stock) / Threshold (high stock)
Snippets
twt.extension.stockBadge.highStock.label%stock%is replaced by the "Threshold (high stock)".
twt.extension.stockBadge.lowStock.label%stock%is replaced by the available stock.
twt.extension.stockBadge.stock.label%stock%is replaced by the available stock.
twt.extension.stockBadge.highStock.icon- Note: May be replaced by a theme configuration.
twt.extension.stockBadge.lowStock.icon- Note: May be replaced by a theme configuration.