Product Metafield
Last updated
Last updated
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.
Log in to the Commerce dashboard and click on Online store.
Then click on Metafields.
Then click on products.
Select the name of the product for which you want to display the custom label and click on the product name.
Next click the Add Metafield button
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.
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.
Only one label can be added to one product.
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 :