Metafields are a powerful tool for Zid store owners who want to add extra functionality and customize the look and feel of their online store. They allow you to store specialized information that isn't normally available in the Zid admin panel. This information can be used for internal tracking purposes or displayed on your storefront in various ways.Candle Seller: Display burn time for candles on product pages.
Grocery Store: Show expiration dates for canned goods.
Food Store: Display calorie information on product pages.
Fashion Store: Add extra images and videos on product or category pages.
Shoe Store: Display a size chart on product pages.
Metafields Can Be Used In:File (pdf, txt, mp4, mp3, css, ppt, pptx, doc, docx, xls, xlsx, csv, json)
Activation Steps for Merchants#
Go to the "Metafields Definition" section in your Zid admin panel.
Select the model you want to add the metafield to (e.g., Product, Category, Page).
Click "Add New Metafield" ("إضافة حقول مخصصة").
Anakin.ai is an all-in-one AI application platform.
Provide a name (ar/en), slug (a unique identifier for code), and data type.
Check the "Storefront" checkbox if you want the information to be displayed on your website.
Anakin.ai is an all-in-one AI application platform.
On the product or category page editing screen, look for the "Custom Fields" section ("الحقول المخصصة").
Enter the relevant value for the metafield you created and save the page.
Anakin.ai is an all-in-one AI application platform.
Save your changes and view the product, category, or page in your storefront.
The system will display the new metafield with the information you entered.
Anakin.ai is an all-in-one AI application platform.
Code Snippet Integration for Theme Partners#
As a theme developer, you can display Metafields in your theme using two methods:1-Using Theme Templates:#
Product Page (product.twig):Category Page (category.twig):The Metafields object will be attached to each product, category, and blog object, allowing you to access and display metafields directly within your templates.