Chapter 9
176
Insert [ShoppingCart] in [Recordset] when [button] is clicked
using OrderID from [ASPServer]
Similar to its Hidden Form Element counterpart, this contract is an interaction
between a basement ShoppingCart element, a submit button, an ASPServer
object and the destination Recordset for the Cart data.
Note:
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, 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
ASPServer (Session or Application basement SmartElement)
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 ...