
Chapter 9
178
Insert [ShoppingCart] in [Recordset] when [button] is clicked
using OrderID from [ASPServer] if [CyberCash] transaction
is success
This contract is an extension of the interaction to submit the Shopping cart
contents to a recordset using an OrderID from the Session. With an additional
participant - the CyberCash element - this contract allows you to submit the cart
contents if the Cybercash transaction was successful, otherwise the cart won't be
submitted. Because the cart is destroyed when it is inserted into the database, this
contract is useful for retaining the contents of a shopper's order if the cybercash
process was unsuccessful so that they can potentially rectify the cause of the
cybercash error and resubmit their order without having to repopulate the
shopping cart.
DrumNote_502 illustrates the use of this contract.
Note that this contract can be used in conjunction with contracts that generate an
OrderID needed for an OrderDetails record (such as the 'Insert order in
[recordset]...' and "Replace [token] in [target] with unique OrderID contracts).
This contract can be used when the cart items are inserted as order details using an
OrderID stored in a Session variable, for instance.
When the button is clicked, the shopping cart data is inserted into the orders
database using the OrderID stored in the ASPServer only if the Cybercash
transaction was successful, where each cart item is an 'order detail'.
Parameters:
OrderIDCol is the name of the OrderID column in the target recordset.
VariableName is the name of the ASP server variable that stores the OrderID
for the current shopping session
SuccessRedirect specifies the target page for redirecting after Cart contents are
successfully added to the database.
FailedRedirect specifies the target page for redirecting if the cart data was not
successfully inserted in the database. This allows you to display an error
message for the user so they'll know the order couldn't be placed.
Participants:
ShoppingCart
Recordset
CyberCash
ASPServer Session or Application baseme nt SmartElement
Button (any clickable object)
Содержание DRUMBEAT 2000 ECOMMERCE EDITION
Страница 1: ...Users Guide macromedia DRUMBEAT 2000 eCOMMERCE EDITION ...
Страница 6: ...Contents 6 ...
Страница 12: ...Introduction 12 ...
Страница 90: ...Chapter 2 90 ...
Страница 110: ...Chapter 3 110 ...
Страница 124: ...Chapter 5 124 ...
Страница 142: ...Chapter 7 142 ...
Страница 152: ...Chapter 8 152 ...
Страница 236: ...Chapter 10 236 ...