Try our new AI assistant by clicking the chat icon in the lower right corner.

Runtime.js Reference

Runtime.js is a native JavaScript file for Miva Merchant. It get output on certain pages and contains functions that Miva uses natively as part of Attribute Machine. However, it also contains functions that a developer can optionally use to build new features.

Examples of these functions include

  1. Loading the available attributes and options for a product
  2. Loading available Shipping Methods for a basket
  3. Update/Delete items in a basket, including attribites
  4. Apply a shipping method or payment method to a basket and re-calculate tax

On this Page

Output Runtime.js on a Page

Starting in 10.03.00 and beyond, the output of runtime.js is controlled by a new component module that you can be assigned to any page. By default it is assigned to the following pages:


You'll notice that the PROD page is not listed above. This file is output on the product page but it happens automatically as part of the JS Attribute Machine needs to run.

Example of runtime.js component module

Runtimejs Component

Example of component assigned to the basket page

Runtimejs Component

Default pages the runtimejs component is assigned to in 10.03.00

Runtimejs Component

The file will get output in the head tag as part of the head_tag component

Examples & Use Cases

Starting in 10.03.00 there are new helper functions available in runtime.js that allow you to do things like update items in the basket or calculate and apply shipping to a basket. The underlying functions are available in the JSON API here under runtime:

These helper funcitons make it easier to run these runtime functions to manulipate the cart and perform other funcitons.


All these functions had a optional delegator parameter which the Miva admin uses to group and priortize requests. It can be omitted in most cases unless your features need that type of grouping and priortization.

Runtime JSON Functions

Looking for Developer Docs?

We have a whole section for that, including: Developer Training Series, Template Language docs, Module Development tutorials and much, much more.

Head to the Developer Section

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.


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