Back to Testament support

Testament - How to setup a product specific countdown

Product & Featured product sections were given added functionality in Testament v13.0.0 which allows merchants to create a countdown timer which can be set within the block settings as a global time for all products or can be unique to a specific product.

1. Adding a countdown timer that is shared by all products:

  1. Open a Product page or the Featured product section.
  2. In the left sidebar click on Add block and select Countdown.
  3. Add text for the active countdown, for example: "Sale ends soon".
  4. Choose your preferred option for when the countdown ends.
  5. Enter a coundown end date in the: DD:MM:YYYY format:
    For new years eve you would enter: 31:12:2024.
  6. Enter an end time in the "HH"MM" format using the 24 hour clock.
    For 1 minute to midnight you would enter: 23:59.
  7. Select background and text colors

This will now show a countdown timer on all product pages.

2. Adding a product specific countdown timer:

First we need to create 2 metafields, starting with the end date.

  1. In your store admin open: Settings > Custom data.
  2. Under Metafield definitions Click on Products then when the page view changes click on the Add definition button.
  3. Enter a Name and a Description, the Namespace and key will be automatically generated for you.
  4. Click on Select type and choose: Single line text.
  5. Leave all the fields blank and click Save.
  6. Now repeat this process to create a time metafield using a different name and description.
    The metafield type should again be Single line text.
When both metafields have been added close the settings window.

3. Adding the countdown to a specific product:
  1. In the admin left sidebar click on products and then open any product that you would like to add a unique countdown to.
  2. When the product page opens scroll down past the images and variants to the Metafields area.
  3. Add your end date and time values to the metafield text inputs.
  4. click save when done. 

4. Setting up the product block to show the countdown.

  1. In your Shopify admin open: Online store > themes.
  2. Next to your live theme click the Customize button to open the theme editor.
  3. In the theme editor locate your product and enter the product page.
  4. In the theme editor left sidebar under Product page click on Add block and select Countdown.
  5. The block will be added to the list of active blocks. Click on it to open its settings.
  6. Enter the active text and completed text ( both of which can be connected to single line or mutliple line text metafields ). Check or uncheck your preference of hiding the block when the countdown ends.
  7. In the Countdown date end input clear all text and then click on the Connect dynamic source icon to the top right of the date input.
  8. In the list of available metafields click on the Countdown end date.
  9. Repeat for the countdown end time.
  10. Add your color scheme and drag the countdown block into you preferred position with the rest of the product content.

This adds the countdown with specific dates for your product. Repeat for any additional products.