Shopping Cart Reference
201
Set line-item discount in [ShoppingCart] if threshold is met based
on criteria in [Recordset] when [button] is clicked
This is an interaction between the ShoppingCart, 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. As opposed to
the other line-item discount contract, this contract allows you to set a discount
based on type (that is, flat vs. percentage) and data (that is, item quantity vs. price)
values stores in the product record. For instance, this would allow you to set a flat
discount based on price for one product and a percentage discount based on
quantity for another product. The contract supports discounts of type "Flat" and
"Percentage" based on item data of "Quantity" or "Price". Then, the contract
compares the line item quantity or cost against the threshold. If the threshold is
exceeded, the discount will be applied and calculated based on the discount type
and discount rate stored in the recordset.
Note:
In order to use this contract, your cart data map must be configured with additional
required columns.
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:
IDCol is the column in the participating recordset that contains the unique ID
of the product to which the discount is being applied.
RateTypeCol is the name of the column in the recordset that stores the rate
type for the discount (that is, whether it is a flat or percentage discount).
Allowed values are Flat and Percentage.
RedirectAfterCompletion toggles whether the application will redirect after the
discount is calculated.
RedirectPage is the target page for redirecting.
ThresholdTypeCol is the name of the column in the recordset that stores the
value of the threshold data type. Allowed values are Quantity and Price.
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 ...