Shopping Cart Reference
179
Insert [ShoppingCart] in [Recordset] when [button] is clicked
using OrderID from [HiddenFormElement] 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 a Hidden Form Element. 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 the related Session version 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).
When the button is clicked, the shopping cart data is inserted into the orders
database using the OrderID stored in the Hidden Form Element 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
HiddenFormElement
Button (any clickable object)
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 ...