24/7 Support: 800.608.6482

Get Started

Developer Docs

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:

Miva believes that all online businesses should have access to a scalable ecommerce platform that can meet their unique business requirements. Miva offers PCI compliant ecommerce, hosting, and custom website design and development solutions. Miva customers have processed over $100 billion in online sales since 1997.

Copyright © 2016 Miva, Inc - All Rights Reserved   Privacy Policy | Store Policy

Contact Us
Receive Tips & Updates

Copyright © 2017 Miva, Inc - All Rights Reserved

Back To The Top