User Guide
Shopping Cart Reference 173
Add item from [Recordset] to [ShoppingCart] when
[imagebutton] is clicked using quantity from [FormElement]
(Looper)
Use this contract to add items to the shopping cart directly from a looper-based
results list without having to navigate to a detail page. It is an interaction between
a basement Shopping Cart SmartElement, an image or image button, an edit box
or drop down list, and a Recordset that provides source data to the Shopping Cart.
When the button is clicked, an item corresponding to the current record in the
Recordset is added to the Shopping Cart using the quantity contained in the form
element. If the form element is empty, the quantity for the added item is one.
Parameters for controlling redirection after adding are described below. You can
optionally redirect, or add without redirecting. Note that the page should be
submitted to itself, as such there should be no action assigned to the form.
Parameters:
Redirect After Adding determines whether you want to redirect after adding
the item or not.
NewItemRedirect specifies the target page for redirecting after an item is
successfully added to the cart.
Redirect if Already in Cart toggles whether you want to redirect to a message
page if the selected item is already in the cart.
AlreadyInCartRedirect specifies the target page for redirecting if an item is
already in the cart.
LooperName is the name of the looper SmartElement on the page
FormElementName is the name of the Form Element in the Looper that will
be used to pass the desired quantity of an item
Recordset ID Col is the the column name for the unique key of the
participating recordset.
Participants:
Form
FormElement (edit box, drop down list)
ShoppingCart
Recordset
Imagebutton (image, image button)