Zid Docs
AppsThemes
Payments
AppsThemes
Payments
Help Center
Slack
  1. Key Concepts
  • Getting Started
    • Introduction
    • Theme Development
    • Vitrin Changelog
    • Creating and Managing Theme Presets
    • Legacy Theme Migration
      • Store Settings Mapping
      • Moving to Vitrin Using LLMs
      • Twig to Jinja
      • Breaking Changes
  • Key Concepts
    • Architecture
    • Templates
      • Overview
      • Overridable Templates
      • Legacy Templates
      • Template Replacements
      • Templates Library
        • home.jinja
        • product.jinja
        • cart.jinja
        • category.jinja
        • products.jinja
        • categories.jinja
        • page.jinja
        • blogs.jinja
        • blog.jinja
        • faqs.jinja
        • reviews.jinja
        • questions.jinja
        • shipping_payment.jinja
        • 404_not_found.jinja
    • Settings
      • Schema files
      • Input Settings
      • Media Settings
      • Form Controls Settings
      • Products Settings
      • Additional Settings
      • Conditional Visibility
      • Migrating twig settings schema
    • Localization
      • localization (jinja v. twig)
    • Theme Editor
      • Overview
  • Building with Vitrin
    • Jinja Basics
    • Vitrin's Jinja Extensions
  • Vitrin CLI
    • Introduction
    • CLI Commands
  • Tips & Tricks
    • Performance
  • JS Integration
    • Supporting both Vitrin and Legacy themes
    • Responses & Errors
    • Cart
    • Products
    • Categories
    • Store
    • Account
    • Blogs
    • Options
    • Events
  • Features
    • SDK Popups – Integration Guidelines
    • Custom Styles Guide
    • Gift Card as a Popup
    • Addresses as a Popup
    • Login as a Popup
    • Checkout as a Popup
    • Apple Pay Quick Checkout
    • Region & Language Popup
    • Dynamic Bundle Products
    • Progressive Discounts
    • Customer Wallet & Cashback
    • Add Preorder Support to Your Theme
  • Mobile Apps
    • Scripts
  • API's
    • Authentication
      • Logout
      • Login Status
      • SMS Login
      • Verify SMS Login
      • WhatsApp Login
      • Verify WhatsApp Login
      • Email Login
      • Verify Email Login
      • Register
      • Register Guest
    • Products
      • List Products
      • Search Products
      • Calculate Product Options Price
      • Notify Product Stock Availability
      • Fetch Bundle Offers
      • Fetch Bundle Offers for a Product
      • List My Product Reviews
      • List Product Reviews
      • Create Product Review
      • Update Product Review
      • Delete Product Review
      • List Product Questions
      • Create Product Question
      • Get Product by Slug
      • Get Selection Groups
    • Categories
      • List Categories
    • Checkout
      • Get Cart
      • Remove Cart
      • Duplicate Cart
      • Add Cart Item
      • Empty Cart
      • Update Cart Item
      • Remove Cart Item
      • Upload Cart Input Field
      • Add Gift Card
      • Remove Gift Card
      • Apply Coupon
      • Remove Coupon From Cart
      • Check Coupon Validity
      • Apply Loyalty Points
      • Remove Loyalty Points
      • Preview Rewarded Points
      • List Redemption Methods for Cart
      • Customer’s Loyalty Wallet
      • Customer’s Current Points Balance
    • Account
      • Get Profile
      • Delete Account
      • Update Customer Profile
      • Get Addresses
      • Create an Address
      • Get an Address by ID
      • Update an Existing Address
      • Delete Address
      • Get Orders
      • Get Shareable Wishlist Link
      • Get Wishlist
      • Add Products to Wishlist
      • Remove Product from Wishlist
      • Get Address Form Schema
      • Check Product Purchase Status
    • Storefront
      • Store Scripts
      • Pages
      • Blogs
    • Countries
      • Get Countries
      • Get Cities By Country
  1. Key Concepts

Architecture

A theme defines how a Zid storefront looks, works, and stays organized.
Themes are built with Jinja templates plus JSON schema files for editable settings, all arranged in a consistent folder structure.

Directory Structure#

All Zid themes must follow this structure:
├── locale/ar/LC_MESSAGES/messages.po
├── assets/
├── sections/
│   ├── slider.jinja
│   └── slider.schema.json
├── components/
│   └── pagination.jinja
└── templates/
│   ├── home.jinja
│   ├── cart.jinja
│   └── product.jinja
├── layout.jinja
├── layout.schema.json
├── footer.jinja
├── footer.schema.json
├── header.jinja
└── header.schema.json


Theme Hierarchy#

The storefront is assembled in layers, starting from the layout and breaking down into reusable parts.
1.
Layout
Defines base HTML wrappers which inject shared <head> tags, header/footer, and global scripts. Templates extend these layouts. Needs to include vitrin tags.

2.
Section
Contains the main page blocks, each split into a .jinja markup file and a companion .json schema. The schema surfaces settings in the Theme Editor, and the section can render multiple components to build complex layouts.

3.
Component
Reusable modules of content that are consumed by sections. Every component has its own .jinja markup and .json schema so that it can be customized by merchants.
Theme Template.png

Assets#

Stored in assets/
Includes CSS, JS, images, and fonts.
All assets are fingerprinted and served via Zid CDN.
Reference any file with the asset_url filter to output its cache‑busted CDN URL:

Templates#

Map storefront routes to actual pages.
Example routes:
/ → home.jinja
/p/{product} → product.jinja
/cart → cart.jinja
Each template references a layout and one or more sections.
👉 Read more: Templates Overview

Gettext Localization#

Stored in locale/{locale}/LC_MESSAGES/messages.po
Plain-text file storing translations: msgid → msgstr.
Natural language keys.
Compiled into .mo files (machine-readable) for performance.
localization msgid
make sure that the msgid is unique in the .po translation file, otherwise file won't be compiled properly
👉 Read more: Localization
Modified at 2026-02-17 07:02:10
Previous
Breaking Changes
Next
Overview
Built with