Sales Badge
(BU)Sales Badge compares a WooCommerce product's regular and sale prices and displays the difference as a percentage or a currency amount. It is a display element: it does not change the price, apply a coupon, or count how many units a product has sold.
Set Up the Badge
- In Bricks → BricksUltimate → Woo Elements, enable Sales Badge and save.
- In WooCommerce, set a Regular price and a lower Sale price for a test product. For a variable product, set the prices on its variations.
- Add (BU)Sales Badge near the product title, price, or image. On a single-product template or in a product grid, leave Product ID blank. In a grid, place the element inside the repeated product card.
- Choose the display type and style the badge. Test the storefront with a discounted product and one that is not discounted. Bricks may show a demo amount while you edit, so use the storefront to verify the actual value.
On a regular page without a current WooCommerce product, you can enter a numeric Product ID to reference a specific item. This setting is a fallback; if WooCommerce has already supplied a product in the current context, that product takes precedence.
Choose How Savings Appear
- Percentage: Displays the price difference divided by the regular price, multiplied by 100. A product reduced from 100 to 75 shows
25%. - Fixed Rate: Subtracts the sale price from the regular price and formats the difference in the store currency. A product reduced from 100 to 75 shows a savings amount of 25, not the final price of 75.
- Math logic: Applies to percentages only. Round uses the nearest whole percentage, Floor rounds down, and Ceil rounds up. A calculated saving of 12.4% displays as 12% with Round or Floor and 13% with Ceil. Choose Floor when you prefer never to round savings up.
- Before Text / After Text: Add optional wording, such as Save before the value or off after it. The element adds the percent sign or currency formatting automatically.
Products, Variations, and Scheduled Sales
- Simple and external products: The calculation uses the product's regular and sale prices. If the loop item is an individual variation, it uses that variation's prices.
- Variable parent products: The badge compares the lowest regular variation price with the lowest sale variation price. Those values may come from different variations. It does not calculate the best discount across every variation or update when the shopper selects an option. Check the displayed result against your variations before promoting it as a specific offer.
- Scheduled sales: The badge compares price values rather than independently checking the WooCommerce sale schedule. Test before and after the sale window. To make visibility follow WooCommerce's sale state, add the BricksUltimate Is on sale? condition set to true in the same product context.
- Small or zero-price discounts: The storefront implementation skips missing sale prices and prices below 1 currency unit. It also hides the badge if the calculated savings are below 1 currency unit in Fixed Rate mode or below 1% after rounding in Percentage mode. Do not use it to advertise a free product or a sub-unit discount without testing.
Style and Position the Badge
Use Tag and Display to fit the badge into your layout. For a compact label, choose inline-block, leave width and height unset, and use padding. Use background color and typography for contrast. In flex mode, the main- and cross-axis controls align the badge contents.
For an image overlay, place the badge inside the image wrapper, set the wrapper to Relative, and position the badge Absolute with the desired offsets. Check mobile cards with longer currency values and leave room for wishlist buttons or other badges.
Troubleshooting
- The badge is missing: Verify that a valid regular price and a lower sale price are saved on the item being rendered. Check the minimum display rules above and test with a product whose prices produce a clear difference.
- The badge shows the wrong product: Put it inside the repeated card, clear Product ID, and verify the query returns products.
- The amount differs from the cart discount: Compare the saved product prices first. Coupons, cart fees, and checkout-only promotions are not used in the badge calculation.
- Two sale labels appear: Check whether the native product layout already outputs a sale badge. Keep the label that best fits your design.
Related: Original Sales Badge guide, Sold Out Badge, and Best Selling Badge.