Product Metafield

Metafield is a simple piece of code to display data that can be used on products and pages.

The discussion about Metafields is long. For this tutorial, there is more on the built in Metafield that has been embedded in the :

  • Solaris theme

  • Hartamas theme.

  • Tampin Themes.

See an example of the built-in Metafield for custom labels.

See the orange "Fast Selling" label which is a built-in custom label that can be used in each online store.

Set up Product Metafield

  1. Log in to the Commerce dashboard and click on Online store.

  1. Then click on Metafields.

  1. Then click on products.

  1. Select the name of the product for which you want to display the custom label and click on the product name.

  1. Next click the Add Metafield button

Add a metafield

  1. Fill in the information in the Key and Namespace fields just like the picture below, that is:

    • Key : custom

    • Namespace : label

    • Value Type : String

    • Value : New Arrival or according to your creativity.

  2. Next click the Save button.

7. Go back to your store front and see the results on the homepage, a New Arrival label will be displayed on the product you have specified.

Additional Information

  • Only one label can be added to one product.

Color Label Product Metafield Changes

To change the color of the product label in Themes, you can go to:

Solaris: Dashboard Overview -> Online Stores -> Installed Themes -> Customize -> Homepage Settings -> Custom Label Color.

Hartamas: Dashboard Overview -> Online Stores -> Installed Themes -> Customize -> General Styling -> Label Color.

Tampin: Dashboard Overview -> Online Stores -> Installed Themes -> Customize -> Homepage Settings -> Custom Label Color.

Attention: If changes do not take effect, you can try clearing your browser cache and restarting your browser.

The result will be displayed as below :

Last updated