User Guide

Shopping Cart Reference 199
Add [flat-value] adjustment [type] to [ShoppingCart] when
[button] is clicked (requires submit)
This is an interaction between the ShoppingCart and a button that adds a flat
adjustment to the cart without any data criterion constraints. An adjustment in
this context represents a fee or discount on the total order and is set using the
'AdjustmentType' parameter. Use this contract to provide an 'optional'
adjustment based on the user's selection. For instance, you could provide a variety
of optional fees such as gift wrapping. The user can then choose to apply the fee
by clicking the button. Be sure to use the companion contract "Remove
adjustment when button is clicked" to allow the user to change their mind.
This contract applies a flat adjustment specified in the 'FlatAdjustment' parameter
when the button is clicked. A related contract is available to apply percentage
adjustments in this manner. Note that these adjustments are global to the order
and are not relevant to specific line-items in the shopping cart. Additional
contracts are available to provide discounts at the product (that is, line-item) level.
Parameters:
AdjustmentName is the name of the adjustment
AdjustmentType specifies whether the adjustment is a discount or a fee
FlatAdjustment is the value of the adjustment (dollars)
Participants:
ShoppingCart
Button (form button, image, any object with an 'onClick' event)