Created by potrace 1.16, written by Peter Selinger 2001-2019

Miva Developer Docs


mmt checkout writes five folders, plus .mmt for its own tracking. They’re always created, even when empty.

mystore-dev/
├── .mmt/              MMT's tracking data for this checkout
├── templates/         Page templates and their settings
├── properties/        Store, product and category properties
├── js/                JavaScript resources
├── css/               CSS resources
└── resourcegroups/    Resource groups

A real checkout#

The Shadows repository keeps the mmt checkout of a stock Shadows store in its mmt folder, with a tag for each release (https://github.com/mivaecommerce/shadows/tree/<version>/mmt). Browse it to see what each file looks like. A shortened view:

mmt/
├── templates/
│   ├── abal.mvt                                     Page template
│   ├── abal.json                                    The page's settings
│   ├── abal-header.mvt                              Template of an item on the page
│   ├── email_abandoned_basket.mvt                   Email page template
│   └── email_abandoned_basket-toe_basket_contents.mvt
├── properties/
│   ├── cssui_button/        <code>.json and <code>.mvt for each button
│   ├── font/                <name>.json for each font
│   ├── mm_theme/            fonts.mvt
│   ├── readytheme_banner/   header_message.json
│   ├── readytheme_contentsection/
│   ├── readytheme_image/
│   ├── readytheme_lookandfeel/   settings.json
│   ├── readytheme_navigationset/
│   ├── templateorderemail/  ABANDONED_BASKET.json, BACKORDER_NOTICE.json, ...
│   └── theme/               theme.json
├── js/
│   ├── GTM-dataLayer.json   Inline resource: settings
│   └── GTM-dataLayer.mvt    Inline resource: source
├── css/
│   ├── core.json            Local resource: settings
│   └── core.css             Local resource: file contents
└── resourcegroups/
    └── head_tag.json

File names#

Files are named after the object’s file name or code. If a name has any character other than letters, numbers, -, _ and spaces, MMT names the file with the MD5 hash of the name instead, for example 5d41402abc4b2a76b9719d911017c592.json. .mmt/state.json maps the hashed name back to the object.

Templates#

File Holds
templates/<file name>.mvt A template’s source. Every template that doesn’t belong to a property is here: page templates and the templates of their items.
templates/<file name>.json A page template’s settings, covering the page and its items. Written only when the page has settings.

Properties#

Properties are grouped by type: Theme Components, headers and footers, buttons, email templates and so on. Each type has a folder named after the type code Miva uses.

Path Holds
properties/<type>/<code>.mvt and .json A store-level property’s template and settings
properties/product/<type>/<product code>.mvt and .json A product’s property, such as its header or footer
properties/category/<type>/<category code>.mvt and .json A category’s property, such as its header, footer, title image or tree image

The type folders depend on which modules the store has installed. The ones that come with Miva:

Folder Holds Module
cssui_button Buttons (Global Settings > Buttons) CSSUI Buttons
cssui_cattitle, cssui_cattree Category title images and category tree images (under properties/category/) CSSUI Category Title, CSSUI Category Tree
header, footer Product and category headers and footers (under properties/product/ and properties/category/) CSSUI Product/Category Header & Footer
templateorderemail Emails Template Based Emails
quote_email Quote emails Manage Quotes
flex Flex Components Flex Component
mm_theme Theme Component settings Theme Component
theme, font Theme settings and fonts Built into the store
mvga Google Analytics settings Google Analytics (Deprecated)
readytheme_contentsection, readytheme_navigationset, readytheme_productlisting Theme Components > Content, Navigation Sets, Product Listings ReadyTheme
readytheme_banner, readytheme_image, readytheme_lookandfeel Theme Components > Banners, Images, Settings ReadyTheme

The .json file is written only when the property has settings, and the .mvt only when it has a template. Email properties (templateorderemail), for example, are only .json: they hold the email’s settings, and page_code names the page in templates/ (such as email_abandoned_basket.mvt) that holds the email’s content.

Hidden settings#

Settings whose names start with . are hidden settings. Checkout leaves them out of template and property .json files unless you use --include-hidden-settings (-s).

Sync flags#

Checkout’s -t and -p options keep only templates or properties whose sync flag is on and leave the rest out of the checkout. The choice is saved with the checkout and used by later pulls.

JavaScript and CSS resources#

Each resource has a .json settings file. Inline and Local resources also have a content file:

File Holds
js/<code>.json, css/<code>.json Settings: code, type, is_global, active, attributes, plus filepath (External and Local), linked_pages (when not global) and linked_resources (Combined)
js/<code>.mvt, css/<code>.mvt Source of an Inline resource
js/<code>.js, css/<code>.css Contents of a Local file resource

External, Combined and Module resources have only the .json. Changing code or type in the .json has no effect; MMT doesn’t send them. mmt sri writes integrity and crossorigin into attributes.

Resource groups#

resourcegroups/<code>.json lists the group’s linked JavaScript and CSS resources.

The .mmt folder#

File Holds
.mmt/config.json The checkout’s remote, branch, tags and checkout options
.mmt/state.json The changeset you’re on, and a hash of every tracked file as it was last synced

A file counts as modified when its contents no longer match the hash in state.json. Don’t edit these files by hand. If they’re lost or damaged, run mmt checkout --reinitialize <remote> . in the folder to rebuild them without overwriting your files.