How to customize Metafields?!!!

Metafieds can be useful in your store if you need to display custom information on the storefront that is not supported by general specification in your admin.

More about Metafields, the functionality of metafilelds, and requirements of displaying custom data in your store, you can read here.

Time countdown

With the Metafields, you can display the Time countdown on product pages. How to set up the required settings in your admin for the following displaying on your online store, you can find below:

Step 1

Go to your Shopify admin -> Settings -> Custom data, and press the "Products" tab to add a metafield definition specifically for the Product page:

Step 2

Then, hit "Add definition":

Step 3

In the opened dashboard, edit the fields. Here is an example of the settings:

  • Name - Sale countdown

  • Namespace and key - countdown.date

  • Description - Time countdown (optional)

  • Type - Single line text

Save the settings.

Step 4

Now you can decide on the product for which the Time countdown will be displayed.

For this, go to Products in your Shopify admin, and select a product:

Step 5

On the opened product page, scroll down to the "Metafields". Here you can view the available meta fields to edit for the product. In the "Sale Countdown" field, enter an expiration date and time:

Image

Step 6

When you are complete with the settings in your admin, navigate to the theme Editor. In Shopify admin -> Online Store, hit "Customize". Then, select the product template in the top drop-down of the theme Editor. And add the "Time countdown" block to the product page:

Image

Last updated