OT: Theme Sections

Search limit to:






🕒 How to Set Up a Countdown Timer Using Metafields

The Countdown Timer block allows you to display a time-limited offer directly within your product section — perfect for flash sales, seasonal discounts, or limited-stock promotions. This feature helps create a sense of urgency and encourages quicker purchasing decisions.

The countdown works based on Shopify metafields. All you need to do is add a metafield definition once, then set the countdown for any products you want.

1. Add the Metafield Definition

Before you can set a countdown deadline for a product’s sale, you must first define the metafield where that date will be stored. This step only needs to be done once.

Steps:

1. Go to your Shopify admin → Settings → Metafields → Products.

2. Click Add definition.

3. In the Add product metafield definition panel, set up the following details:

    • Name: The recommended name is OTSB Countdown Timer. Using other names may cause issues in this section. 
    • Namespace and key: This will be generated automatically (the result will be custom.otsb_countdown_timer). 
    • Content type: Click Select content type and choose Date and time.
    • Validation: Ensure the Time box is checked to specify an exact hour and minute, not just the date.

4. Click Save. You should now see Product countdown listed under your product metafield definitions.

2. Set the Countdown for a Product

Once the definition is in place, you can assign specific deadlines to individual products that are on sale.

Steps:

1. Go to your Shopify admin → Products, and open the product you want to feature with a limited-time offer.

2. Scroll to the Metafields section at the bottom of the product page.

3. Locate your metafield (Product countdown or the name you chose).

4. Use the date and time picker to set the exact expiration moment for the promotion.

5. Click Save on the product page.

Repeat this process for any other products you want to feature with a unique countdown. Any product left blank will not show the timer.

3. Display the Countdown Timer on Your Store

When a countdown is set for a product, it will automatically display in the Featured Product section through the Countdown Timer block.

To enable it:

  • Add the Countdown Timer block to your Featured Product section in the Shopify theme editor.
  • Customize its appearance as desired.

4. Notes

  • When the countdown ends, the timer will automatically show 00:00:00.
  • You can freely style the block using the available color and background options in the theme editor.