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.
Steps
- 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
- Add the code in multi_add_attributes.html right below the product attributes item in PROD
- Add JS to page, make sure to add the id of "AddToCart" to the PROD page form.
- 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
Example:
When added to cart, 2 items are added. The JS keeps the quantities in sync.
Functions Used
Keywords
ADMP, Multi-Add, Attributes
Language
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.
Accept