24/7 Support: 800.608.6482

Template Branches Overview

The Template Branches functionality is located within the User Interface Navigation Menu. Selecting the current branch name will display all branches and options to create a branch and the Branch Manager dialog.

Changesets

A changeset is one single value in the stack of changes that are being made on a codebase.

Manage Branches

When a record is selected the options to Make Working Branch is available along with exporting a CSV, In-Line Edit, Make Primary Branch, Copy Branch Preview URL, and Delete Branch when the action list items are selected.

When the Add Branch button is selected the Create Branch dialog will appear. Here adding the Branch name, choosing the icon color and Copy From template then selecting the create button will create a new template branch.

Copy Branch

When Copy is selected from the batch menu action icon the Copy Branch dialog appears and contains a wizard to help copy the current branch to any branch.

Step One: Select Branch

Copy Branch Step 1

Step Two: Select Changeset

Copy Branch Step 2

Step Three: Add Notes and Commit

Copy Branch Step 3

Merge Changesets

When Merge is selected from the batch menu action icon the Merge Changesets dialog appears and contains a wizard to help merge any changesets in the current branch to another branch.

Step One: Select Branch

Merge Changesets Step 1

Step Two: Select Changeset

Merge Changesets Step 2

Step Three: Add Notes and Commit

Merge Changesets Step 3

Branch History

When History is selected from the batch menu action icon the History dialog appears where changes can be selected individually and viewed. Changesets can also be reveret from this menu by selecting the record and choosing Revert.

Branch History

Tags

Tags can be found at the bottom of the User Interface Navigation Menu with a flyout menu when selected. Here all tags can be viewed and removed as well as added, multiple tags can be added by using a space between words.

Tags

Miva CLI - MMT (Miva Managed Templates)

Installation

Below are the installation instructions for macOS, Windows and Linux.

macOS Installation

Coming Soon

Windows Installation

Coming Soon

Linux Installation

Coming Soon

Get API Access

You will need to create an API Token to add to the CLI configuration in order to connect to a Miva Merchant store. The API Token will give access to the Miva Merchant store page templates and allow you to download and upload the files to the store.

First navigate to the User Management > API Tokens section within the Miva Merchant admin. Select the Add API Token button which will open the Add API Token dialog box. Give the token a name and allowed IP addresses, then take note of the Access Token and Signature as they will be used when setting the credentials in the Miva CLI. Once those values are copied select Save to complete adding the API token.

Next select the checkbox next to the API Token which was just created then choose the batch list action button ‘...’. In the dropdown select the Groups option to bring up the assigned groups dialog box. In the batch list assign the User Interface group to the API token and close the dialog box.

IMAGE

CLI Commands - Miva Managed Templates (MMT)

mmt help

By running this command a list and information about all the subcommands will be displayed

Usage
$ mmt -h 
$ mmt --help

mmt credential

Store credentials
Usage
mmt credential [-h]

mmt credential SubCommands

mmt credential list

List values of all saved credential keys.

Usage
mmt credential list [-h] 
Output Values
Name, Method, URL, Token, Username, Filepath

mmt credential add

Add a credential

Usage
mmt credential add [-h] --url URL [--token TOKEN]
			[--signing-key SIGNING_KEY]
			[--ssh-username SSH_USERNAME]
			[--ssh-private-key SSH_PRIVATE_KEY]
			key
		
Positional Arguments
key
// The name of the credential key
Optional Arguments
-h, --help            
// Show help message and exit
--url URL
// The API URL where API will requests will be sent
--token TOKEN
// The API token used to make API requests
--signing-key SIGNING_KEY
// The API signing key used to sign API requests
--ssh-username SSH_USERNAME
// The Miva Merchant username associated with the SSH credential
--ssh-private-key SSH_PRIVATE_KEY
// The filepath to the SSH private key

mmt credential update

Update a credential

Usage
mmt credential update [-h]
	[--credential-key CREDENTIAL_KEY]
	[--url URL] [--token TOKEN]
	[--signing-key SIGNING_KEY]
	[--ssh-username SSH_USERNAME]
	[--ssh-private-key SSH_PRIVATE_KEY]
	key
Positional Arguments
key
// The key to associate the credential with
Optional Arguments
-h, --help            
// Show help message and exit
--credential-key CREDENTIAL_KEY
// The new credential key value
--url URL             
// The API URL where API will requests will be sent
--token TOKEN         
// The API token used to make API requests
--signing-key SIGNING_KEY
// The API signing key used to sign API requests
--ssh-username SSH_USERNAME
// The Miva Merchant username associated with the SSH credential
--ssh-private-key SSH_PRIVATE_KEY
// The filepath to the SSH private key

mmt credential delete

Delete a credential

Usage
mmt credential delete [-h] key
Positional Arguments
key
// Delete credential associated with the key
Optional Arguments
-h, --help
// Show help message and exit

mmt info

Outputs information about a local MMT directory

Usage
mmt info [-h] [path]
Values
Credentials
	Key: KEY NAME
	Method: Token
	URL: https://domain_name.com/mm5/json.mvc
	Token: TOKEN VALUE
  
Remote
	Store Code: STORE CODE
	Branch Name: BRANCH NAME
	Branch Key: BRANCH KEY VALUE
	Branch Tags: <None>
  
Changeset
	ID: ID VALUE
	Username: USERNAME
	Notes: NOTES

mmt config

Configure settings

Usage
mmt config [-h]

mmt config SubCommands

mmt config list

List value of saved configuration settings

Usage
mmt config list [-h]
Values
diff: <Not Set>
editor: <Not Set>

mmt config set

Set a configuration setting (valid values include 'diff, editor')
Usage
mmt config set [-h] key value
Positional Arguments
key
// Name of the configuration setting (valid values include 'diff, editor')
value           
// Value of the configuration setting

mmt config delete

Delete configuration setting

Usage
mmt config set [-h] key value
Positional Arguments
key
// Name of the configuration setting (valid values include 'diff, editor')
value           
// Value of the configuration setting

mmt remote

Configure a remote resource

Usage
mmt remote [-h]

mmt remote SubCommands

mmt remote list

List remote resources

Usage
mmt config list [-h]
Optional Arguments
-h, --help
// Show help message and exit
Output Values


	

mmt remote add

Add a remote resource

Usage
mmt remote add [-h] --credential-key
		CREDENTIAL_KEY --branch-name
		BRANCH_NAME --store-code STORE_CODE
		key
Positional Arguments
key
// The key of the remote resource
Optional Arguments
-h, --help
// Show help message and exit
--credential-key CREDENTIAL_KEY
// The key associated with the stored credential
--branch-name BRANCH_NAME
// The branch name to checkout
--store-code STORE_CODE
// The store code from which to checkout

mmt remote update

Update a remote resource

Usage
mmt remote update [-h] 
		[--remote-key REMOTE_KEY]
		[--credential-key CREDENTIAL_KEY]
		[--store-code STORE_CODE]
		[--branch-name BRANCH_NAME]
		key
Positional Arguments
key
// The key of the remote resource
Optional Arguments
-h, --help
// Show help message and exit
--remote-key REMOTE_KEY
// The new remote key value
--credential-key CREDENTIAL_KEY
// The key associated with the stored credential
--store-code STORE_CODE
// The store code associated with the remote resource
--branch-name BRANCH_NAME
// The branch name associated with the remote resource

mmt remote delete

Delete one or more remote resources

Usage
mmt remote remote delete [-h] key [key ...]
Positional Arguments
		key         Delete remote resources associated with the key
Optional Arguments
-h, --help
// Show help message and exit

mmt switch

Switch to a new remote source

Usage
mmt switch [-h] remote-key
Positional Arguments
remote-key
// The key associated with the stored remote resource
Optional Arguments
-h, --help
// Show help message and exit

mmt checkout

Checkout a branch

Usage
mmt checkout [-h] [-c C] 
		[--sync-all-templates]
		[--sync-all-properties]
		remote-key [path]
Positional Arguments
remote-key
// The key associated with the stored remote resource
path
// The path where the checked out branch should be created
Optional Arguments
-h, --help
// Show help message and exit
-c C                  
// Checkout a specific changeset
--sync-all-templates  
// Sync all templates
--sync-all-properties
// Sync all properties

mmt update

Update local files to remote server's version

Usage
mmt update [-h] [-c C] [filenames [filenames ...]]
Positional Arguments
filepaths
// The list of local files to update. If blank, all files within the checked out changeset / the specified changeset will be updated
Optional Arguments
-h, --help  
// Show help message and exit
-c C
// Update to specified changeset

mmt commit

Commit the local files to the remote server

Usage
mmt commit [-h] [-n NOTES] [filenames [filenames ...]]
Positional Arguments
filepaths
// The list of local files to commit. If blank, all locally modified files will be committed
Optional Arguments
-h, --help
// Show help message and exit
-n NOTES, --notes NOTES
// Notes describing the changes to be committed

mmt tag

List, add, set, or delete the branch tags

Usage
mmt tag [-h]
Optional Arguments
-h, --help  
// Show  help message and exit

mmt tag SubCommands

mmt tag list

List tags

Usage
mmt tag list [-h]
Values


	

mmt tag add

Add one or more tags

Usage
mmt tag add [-h] tags [tags ...]
Positional Arguments
tags
// The tags to be added
Optional Arguments
-h, --help  
// Show help message and exit

mmt tag set

Overwrite existing tags

Usage
mmt tag set [-h] tags [tags ...]
Positional Arguments
tags        
// The tags to be set
Optional Arguments
-h, --help
// Show help message and exit

mmt tag delete

Delete one or more existing tags

Usage
mmt tag delete [-h] [--all] [tags [tags ...]]
Positional Arguments
tags        
// The tags to be deleted
Optional Arguments
-h, --help
// Show help message and exit
--all       
// Delete all existing tags

mmt log

Lists the changes made to a specific changeset or to a group of changesets

Usage
mmt log [-h] [-c C | -C C] [-v] [path]
Positional Arguments
path
// The path to the directory
Optional Arguments
-h, --help     
// Show help message and exit
-c C           
// Get the changes since a specific changeset
-C C           
// Get the changes for a specific changeset
-v, --verbose  
// Include a list of modified files within each changeset

mmt status

Lists files that have been locally modified

Usage
mmt status [-h] [path]
Positional Arguments
path
// The path to the directory
Optional Arguments
-h, --help
// Show help message and exit

mmt diff

Diff files that have been locally modified

Usage
mmt diff [-h] [filenames [filenames ...]]
Positional Arguments
filepaths
// The list of local files to diff. If blank, all locally modified files will be diffed
Optional Arguments
-h, --help  
// Show help message and exit

mmt revert

Revert files that have been locally modified

Usage
mmt revert [-h] [--all] [filenames [filenames ...]]
Positional Arguments
filepaths
// The list of local files to revert
Optional Arguments
-h, --help  
// Show help message and exit
--all
// Revert all files

Code Deployment

Utilizing Version Control

Developer Workflows

Download Locally

  1. Create new development template branch
  2. Download UI (Templates, CSS, JS, Theme Components) locally
  3. Make changes locally, push up changes to development template branch to preview
  4. Push to Git/Subversion [Code repo becomes the master for all templates]
  5. If multiple developers, they repeat steps 1-4 themselves and push to repository
  6. Merge all code into code repository / Handle merge conflicts

Deploy Code To Production

  1. Create new staging template branch & download UI locally
  2. Overwrite UI with master from code repository
  3. Push up to staging template branch and QA
  4. Deploy to primary template branch via Miva admin using merge, copy or swap

Note: The following things need to be done manually in admin

  • New CSS/JS files
  • New Page Templates
  • New Theme Component
  • New Item Assignments
  • Create Branches
  • Swap Branches

This website uses cookies to identify visitors, track visitors to our website, store login session information and to remember your user preferences. By continuing to use this site you agree to our use of cookies. Learn More.

This website uses cookies. By continuing to use this site you agree to our use of cookies. Learn More.

Accept

Copyright © 1997 – 2019 Miva©, Miva Merchant©, MivaPay©, MivaCon© Miva, Inc. All Rights Reserved.