Multiple Additions From Link
Previous  Top  Next

This section will show you how to add multiple items to the cart from a single click on a hyperlink, this could be useful if you have a set of products that can combine to become a kit of some description, you could add a hyperlink that will allow the customer to add all the products that make up the kit very easily.

Begin by editing the products/product.aspx page, select the "Add all products in this category" link currently linked to "#", using the built in link editor shown in the following image, select "BatchAdd.aspx" as the File Name.

clip0059

Then click the Parameters button and in the Parameters dialog click the plus symbol and give the new parameter a name of "CatID" as shown in the following image.


clip0061

Then click within the value area and a Dynamic date button will appear (also shown in previous image), click this dynamic data button and select the Category field of the Dataset as shown in the following image.


clip0062


Click ok and the selected expression will be inserted into your parameter value, click the "OK" button on all the other dialogs and your link should now contain an href value of:

BatchAdd.aspx?CatID=<%# DataSet1.FieldValue("Category", Container) %>

Clicking this link will add all the products from the current category to the cart in a single click.