
Chapter 9
200
Set line-item [type] discount from [Recordset] in [ShoppingCart]
if [data] threshold is met when [button] is clicked
This is an interaction between the Shopping Cart, a recordset and a button that
will determine whether a line item discount should be applied on a particular
product based on criteria stored for that product in the recordset. The recordset
stores a threshold for receiving the discount and the discount rate. Parameters
from the contract specify whether the discount will be based on the line-item
quantity or total cost, as well as whether the discount will be a flat or percentage
discount. Then, the contract compares the line item quantity or cost against the
threshold. If the threshold is exceeded, the discount will be applied and a discount
will be calculated based on the discount type set as a parameter and the discount
rate stored in the recordset.
Note:
In order to use this contract, your cart data map must be configured with additional
required column.
See DrumNote_506 for details on configuring your cart data map to enable line
item discounts.
Note:
This contract should be used in conjunction with the "Add item to cart" contracts,
where this contract will determine if a discount applies based on the item that has been
added. The actions for this contract occur in the Cart PostServer() event. It is therefore
important that you disable the redirection options of the "AddToCart" contracts, otherwise
this contract won't be executed. Use the redirect parameters for this contract instead.
Parameters:
Discount Based On specifies if the discount is based on quantity or cost of the
line item.
DiscountType specifies whether the discount is a flat or percentage discount.
This determines how the discount value is calculated.
IDCol is the column in the participating recordset that contains the unique ID
of the product to which the disocunt is being applied.
RedirectAfterCompletion toggles whether the application will redirect after the
discount is calculated.
RedirectPage is the target page for redirecting.
Participants:
ShoppingCart
Recordset
Button (form button, image, any object with an 'onClick' event)
Summary of Contents for DRUMBEAT 2000 ECOMMERCE EDITION
Page 1: ...Users Guide macromedia DRUMBEAT 2000 eCOMMERCE EDITION ...
Page 6: ...Contents 6 ...
Page 12: ...Introduction 12 ...
Page 90: ...Chapter 2 90 ...
Page 110: ...Chapter 3 110 ...
Page 124: ...Chapter 5 124 ...
Page 142: ...Chapter 7 142 ...
Page 152: ...Chapter 8 152 ...
Page 236: ...Chapter 10 236 ...