24/7 Support: 800.608.6482

Get Started

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.


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