Product Banners show a banner on the product page when a product pricing rule applies to the product at the chosen quantity, for example "Buy 3 and save 10%" from the rule's public description. Turn them on in WooCommerce > Pricepep > Promotion > Product Banners.
How do I add product banners?
- Write the offer in the rule's Description - Public, for example "Buy 3 or more and save 10%".
- Go to WooCommerce > Pricepep > Promotion.
- Under Product Banners, tick Enable, set Position, Title and Message.
- Click Save Changes.
Which settings do banners have?
| Setting | Default | What it does |
|---|---|---|
| Enable | Off | Turns banners on. |
| Position | Add to cart - Before | Add to cart - Before/After, Product meta - Before/After, Product summary - Before/After. |
| Title | Promotion | Banner heading; can be empty. |
| Message | Add this product to cart now to get a special price. | Banner text with macros. |
Macros in Title and Message:
| Macro | Shows |
|---|---|
{{description}} | The rule's Description - Public |
{{price}} | The unit price after pricing rules for the chosen quantity (an average if units get different prices) |
{{original_price}} | The unit price before pricing rules |
{{start_date}} | The first day of the promotion (since 2.6.0) |
{{end_date}} | The last day of the promotion (since 2.6.0) |
Example message: {{description}}<br>Your price: {{price}} instead of {{original_price}}.
How do I show the dates of a sale?
Use {{start_date}} and {{end_date}}, for example Sale from {{start_date}} to {{end_date}} or Offer ends {{end_date}}. They come from the rule's Date and Date & time conditions, so the banner follows when you change the dates:
| Rule's conditions | {{start_date}} | {{end_date}} |
|---|---|---|
| Date from 2026-12-01 and Date to 2026-12-07 | December 1, 2026 | December 7, 2026 |
| Date specific date 2026-11-27 | November 27, 2026 | November 27, 2026 |
| Date & time to 2026-12-24 18:00 | empty | December 24, 2026 |
| Date & time to 2026-12-08 00:00 | empty | December 7, 2026 |
| Days of week only, or no date condition | empty | empty |
- Dates are shown in the date format and time zone of your site (Settings > General in WordPress; the table uses "F j, Y"). The macros show the day only, also for Date & time conditions.
- With several such conditions, the latest from and the earliest to count, because all conditions of a rule must match. Time, Days of week, Days of month and Months don't set dates.
- A Date & time to at 00:00 ends the rule as that day starts, so
{{end_date}}shows the day before, the last day the rule applies (the Countdown Timer still counts down to 00:00). - A macro without a date is empty, so write texts that still read well then, or use it only in rules that have both dates.
- The macros also work inside a rule's Description - Public, wherever Pricepep shows it:
{{description}}in banners, Cart Item Descriptions, Customer Notifications and the hover tips in the classic cart. Each description shows the dates of its own rule.
For a live countdown to the end of the sale, add the Countdown Timer.
When does a banner appear?
When the product, at the quantity in the quantity field (and the chosen variation), would get a price change from a product pricing rule if added to the current cart. One banner per applicable rule; identical banners show once. The banner loads after the page and updates when the quantity or variation changes. On variable products it appears after a variation is chosen.
So a bulk rule from 10 units shows its banner only when the quantity is 10 or more (or the cart already holds enough). To show tiers up front, use the Volume Pricing Table. Offers that need another step first, such as adding a different product, don't show a banner until that step is done.
How do I change the banner design?
Style the rp_wcdpd_promotion_product_banners_banner classes with CSS, or copy the template extensions/promotion-product-banners/templates/banner.php to your-theme/wc-dynamic-pricing-and-discounts/extensions/promotion-product-banners/banner.php. The template has action hooks before and after the title and content, and the texts pass through filters (see the filter reference).
Frequently asked questions
When is a product banner shown?
When adding the chosen quantity of the product to the current cart would make a product pricing rule apply to it.
Can the banner show the rule's description?
Yes. Use the {{description}} macro in Message; it shows the rule's Description - Public.
Can a banner show when a sale starts and ends?
Yes, since 2.6.0: {{start_date}} and {{end_date}} show the first and last day of the promotion, taken from the rule's Date and Date & time conditions, in your site's date format. Without such a condition they stay empty.