24/7 Support: 800.608.6482

Developer Docs

Code Samples | Product Multi-Add As Attributes

This code allows you to have a single add to cart button on the product page add multiple products to the cart. The products are called in from a custom field as a comma separated list and are displayed on the PROD page as an upsell or attribute.


  1. Create Custom Product Field with code of "add_on_product". This will be used to store a comma separated list of product codes you want to display
  2. Add the code in multi_add_attributes.html right below the product attributes item in PROD
  3. Add JS to page, make sure to add the id of "AddToCart" to the PROD page form.
  4. Modify the action on the page to ADPM and set the inputs for Quantity and Product_Code to be Products[1]:Code and Products[1]:Quantity


When added to cart, 2 items are added. The JS keeps the quantities in sync.

Functions Used



ADMP, Multi-Add, Attributes


Template Language

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 – 2023 Miva©, Miva Merchant©, MivaPay©, MivaCon©, Camp Miva ℠, Miva, Inc. All Rights Reserved.