Sale badge, countdown and campaign products Pro
What shoppers see while a campaign runs, and the Campaign products block and shortcode.
While a campaign has a product on sale, shoppers can see it: the campaign's name in the product's sale badge, a countdown to the end of the sale under the price, and a list of the campaign's products on any page. All three use your theme's fonts and colours, and work with classic and block themes.
Sale badge
Where the theme shows its "Sale!" badge, a product on sale in a running campaign shows the campaign's name instead, for example Black Friday. The badge keeps the theme's shape and colour; it only gets wider to fit the name.
A product that is on sale on its own (not through a campaign) keeps the theme's badge. A product a campaign is holding for a higher-priority one shows the campaign that actually has it.
Countdown
Products in a campaign that has an end date show the time left under the price:
Sale ends in 2d 04:13:22
It ticks every second and disappears when the sale ends. By default it shows on product pages, in the last 7 days of the sale. Campaigns with no end date never show one.
If your theme or another plugin already shows its own sale countdown, turn one of them off so shoppers do not see two.
Settings
Go to WooCommerce › SaleCraft › Settings, section Storefront.
- Campaign name in the sale badge: on by default.
- Badge wording: your own text with
{name}, for example{name} deal. Leave it empty for the name alone. - Countdown to the end of the sale: on product pages (the default), on product pages and in product lists (shop, category, related products, product blocks), or off.
- Start the countdown: in the last 1, 3, 7 (the default), 14 or 30 days of the sale, or for the whole sale.
- Countdown wording: your own text with
{time}. Leave it empty for the default in the site's language.
Listing a campaign's products
Add the Campaign products block (in the WooCommerce category of the block inserter) to any page or post, and choose:
- Campaign: one campaign, or every running campaign. Scheduled campaigns can be chosen ahead of time; their products appear when they start.
- Products and Columns: up to 100 products, 1 to 6 columns.
- Order by: most recently put on sale (the default), price, best selling, rating, name, newest product or the shop's own order.
Classic themes and page builders can use the shortcode instead:
[salecraft_campaign_products campaign="12" limit="8" columns="4" orderby="price"]
Leave out campaign for every running campaign. A campaign's ID is in its address in the Campaigns tab.
The list uses WooCommerce's own product grid, so it looks like your shop pages. It shows nothing while no campaign is running, so a "Sale" page can stay in your menu between campaigns. Products hidden from the catalogue stay hidden.
Good to know
- A full-page cache keeps showing what it saved: after a campaign starts or ends, the badge and list catch up when the cache refreshes. The countdown itself hides on time either way.
- A variable product shows the badge and countdown when the campaign has any of its variations.
Developers can change or hide each of these: see Hooks and integration.