24/7 Support: 800.608.6482

Template Language

Miva Multi-Add Documentation - ADPM

ver.9.3 and later

9.0003 introduces a brand new action, ADPM which allows you to add multiple products to the cart (including their attributes) with a single form submit. It functions similarly to how the single product add to basket form submit works. Instead of accepting the usual g.Product_Code, g.Quantity, and g.Product_Attributes[] variables, ADPM expects a g.Products[] array. Within g.Products[] each index is expected to have a code and quantity member, and an optional attributes array.

If there are any errors, for example one of the products you added is out of stock, or is missing a required attribute, the action will add all other products and display all error messages on the screen. This makes it important that the page the user is taken to when they hit submit has the error messages array also on the page to be able to display the proper error messages.

CTGY Example:

In this example, the product attribute output would need to be modified as follows:

Subscription Example - The ADPM action also supports adding subscriptions.

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

Copyright © 1997 – 2025 Miva®, Miva Merchant®, MivaPay Vault®, Camp Miva®, Miva Connect®, Vexture℠, Miva, Inc. All Rights Reserved.