Updateable form fields
The shopping cart display not only displays the data for an item in the shopping cart, but it provides the ability to update information about items in the shopping cart as well.
The Update Cart button in the shopping cart display has a server behavior component that checks the state of form fields in the shopping cart display, and applies any changes to the contents of the shopping cart.
By default, the eCart Display Manager allows you to include two common updateable fields as columns in the shopping cart display. These are the Quantity Edit field, and the Delete checkbox.
The Quantity Edit field allows the user to update the number of a specific item within the shopping cart.
The Delete checkbox removes an item from the shopping cart when checked.
It is possible to configure your shopping cart display to use additional updateable form fields as your needs dictate. For example, you may wish a customer to be able to change an option such as size for a given item in the shopping cart.
eCart provides three types of updateable form fields for use within the shopping cart display. They are: The Delete Checkbox and the Quantity Edit field are common use cases of the Updateable Checkbox and Updateable Text Field, respectively.
You may use these updateable form fields to accept input from the customer, and then apply their changes to the shopping cart using the Update button.
As stated above, the Quantity Edit and Delete Checkbox are available directly for configuration within the eCart Display Manager for use in creating a shopping cart display. These two special cases do not require that a column be defined within the eCart Object.
When creating the shopping cart display, the column associated to the updateable field needs to be included in the shopping cart display.
If using the eCart Display Manager to create the shopping cart display, you will not have the option of specifying that a given column is to contain an updateable form field. Therefore, when the shopping cart display is inserted, the value for that column will be display text.
Once the display has been created, you may remove the display text for the given column, and replace it with the appropriate updateable form field specific to your needs.
The following sections detail the steps for inserting each type of updateable form field into a shopping cart display and configuring it to update the appropriate shopping cart column.
Note: The configuration interfaces for each updateable form field can only be used to insert the given field and cannot be used to modify configuration after insertion. Unless you are comfortable with modifying the code directly, please delete and apply the given field to the page again to ensure that configuration changes are made correctly.
The Update Cart button in the shopping cart display has a server behavior component that checks the state of form fields in the shopping cart display, and applies any changes to the contents of the shopping cart.
By default, the eCart Display Manager allows you to include two common updateable fields as columns in the shopping cart display. These are the Quantity Edit field, and the Delete checkbox.
The Quantity Edit field allows the user to update the number of a specific item within the shopping cart.
The Delete checkbox removes an item from the shopping cart when checked.
It is possible to configure your shopping cart display to use additional updateable form fields as your needs dictate. For example, you may wish a customer to be able to change an option such as size for a given item in the shopping cart.
eCart provides three types of updateable form fields for use within the shopping cart display. They are: The Delete Checkbox and the Quantity Edit field are common use cases of the Updateable Checkbox and Updateable Text Field, respectively.
You may use these updateable form fields to accept input from the customer, and then apply their changes to the shopping cart using the Update button.
Feature access
Updateable form fields can be inserted from the following locations:- The eCart Insert panel/toolbar:
- Insert > WebAssist > eCart > Updateable [form field]
Configuring the shopping cart display to use an updateable form field
For an updateable form field to be included in the shopping cart display, the display must first have a column configured specific to the information for the given item. This means the column must be configured within the eCart Object prior to creating the shopping cart display.As stated above, the Quantity Edit and Delete Checkbox are available directly for configuration within the eCart Display Manager for use in creating a shopping cart display. These two special cases do not require that a column be defined within the eCart Object.
When creating the shopping cart display, the column associated to the updateable field needs to be included in the shopping cart display.
If using the eCart Display Manager to create the shopping cart display, you will not have the option of specifying that a given column is to contain an updateable form field. Therefore, when the shopping cart display is inserted, the value for that column will be display text.
Once the display has been created, you may remove the display text for the given column, and replace it with the appropriate updateable form field specific to your needs.
The following sections detail the steps for inserting each type of updateable form field into a shopping cart display and configuring it to update the appropriate shopping cart column.
Note: The configuration interfaces for each updateable form field can only be used to insert the given field and cannot be used to modify configuration after insertion. Unless you are comfortable with modifying the code directly, please delete and apply the given field to the page again to ensure that configuration changes are made correctly.
To apply an Updateable Checkbox to your shopping cart display:
- In Design View, place your cursor in the shopping cart display where you wish to insert the updateable checkbox.
- In the eCart Insert panel/toolbar, click the eCart Updateable Checkbox icon.
The eCart Updateable checkbox dialog opens.
By default, the dialog is configured to insert a Delete Checkbox.
Note that the Cart column to be updated is the Quantity column, and that a checked value updates this to the default value of 0, effectively removing the item from the shopping cart.
As well, note that the Unchecked value is a server-side code reference. This is a data binding that sets the value of the Quantity column to the current value of that column, effectively leaving the item unchanged in the cart.
In this manner, you can set checked and unchecked values to either change or maintain the current state of any cart column. - Select the cart name specific to the eCart Object associated to the shopping cart display.
- For your configuration, select the cart column whose value will be updated based on the state of the checkbox.
- Specify a static value, or click the lightning bolt to specify a data binding, that will set the value of the selected column based on the state of the checkbox (checked or unchecked).
- Click OK to insert the updateable checkbox into the shopping cart display.
To apply an Updateable Text Field to your shopping cart display:
- In Design View, place your cursor in the shopping cart display where you wish to insert the updateable text field.
- In the eCart Insert panel/toolbar, click the eCart Updateable Text Field icon.
The eCart Updateable Text Field dialog opens.
- Select the Cart name for the eCart Object associated to the shopping cart display.
- Select the shopping cart column to be updated for the given item.
- Click OK to insert the updateable text field in the shopping cart display.
To apply an Updateable List to your shopping cart display:
- In Design View, place your cursor in the shopping cart display where you wish to insert the updateable list.
- In the eCart Insert panel/toolbar, click the eCart Updateable List icon.
The eCart Updateable List dialog opens. - Select the Cart name for the eCart Object associated to the shopping cart display.
- Select the shopping cart column to be updated for the given item.
- Click OK to insert the updateable list in the shopping cart display.
- In Design View, select the list on the page.
- Using the property inspector, configure the options available for the list.