Add To Cart Buttons

An Add to Cart Button can be displayed beside any product listing for your customers to add that product to their shopping cart. When clicked, the information for that product is passed to the shopping cart.

The Add to Cart Button is flexible in terms of defining information that populates the columns of the shopping cart. You can specify column data...
  • ...statically during the configuration of the button
  • ...dynamically from a database using a recordset, or other server-side code reference
  • ...using a form field associated to the button, allowing the user to control column data (e.g. Quantity)
The Add to Cart Button dialog is separated into three tabs, each of which is discussed in detail in the following sections:
  • General configuration: configures whether the button uses static information, or information retrieved from a database recordset to populate shopping cart columns when an item is added to the shopping cart.
  • Bindings configuration: configures the information that populates each shopping cart column for the item. Information can be specified statically within the interface, or can be retrieved from a recordset or server-side code.
  • Button configuration: specifies the image or form button used for the display of the button.

Feature access

The Add to Cart Button is available for insert from the following locations:
  • eCart Insert panel/toolbar

  • Insert > WebAssist > eCart > Add to Cart Button
  • Server Behaviors > eCart > Add to Cart

Inserting the Add to Cart Button

  1. In Design View, place your cursor in the location where the Add to Cart button is to be placed.
    If you are adding the button to a product results page created by DataAssist, you only need to insert one button within the results table. This will then be repeated by the Repeat Region Server Behavior created by DataAssist.
  2. From the eCart Insert panel/toolbar, click the Add to Cart Button icon.
  3. Configure the button specific to your needs, as outlined in the sections detailed above.
  4. Click OK to apply the button to the page.

    A form is placed on the page that contains:
    • a hidden field containing the ID of the item
    • all fields that allow the user to specify column data (e.g. Quantity)
    • a form button or image button, depending on your configuration
    In addition, server-side code is placed at the top of the page that contains all the configuration information specific to the item.

To modify the Add to Cart button:

  1. In the Server Behaviors panel (Window > Server Behaviors), click the eCart Add to Cart listing which corresponds to the button to be modified.
  2. Make any necessary configuration changes.
  3. Click OK to apply the changes to the page.

Using the Add to cart Server Behavior without a button

The eCart buttons that are added to your cart and checkout pages use Server Behaviors that you may find useful if not attached to a button. eCart 5 provides the opportunity to use these Server Behaviors separately from the buttons to provide additional functionality.

To use the button's server behaviors, without creating a button, open the appropriate interface from the Server Behaviors panel.

  • Server Behaviors panel > Add (+) > eCart > Add to Cart
  • Server Behaviors panel > Add (+) > eCart > Cart Display