Chapter 10
222
Version 2.0 Contracts
Populate [ListElement] with UPS options using weight from
[ShoppingCart] and billing info from [recordset]
This is a server-side contract that populates a dropdown list with available UPS
shipping options and corresponding shipping costs. After the contract executes,
the dropdown list will display each available shipping option. The corresponding
value stores both the ship method and cost in a delimited string of the form
"ShipMethod:ShipCost." You can then use the "Use [ShipList] data to update/
insert in [ShipViaCol] and [ShipCostCol] of [Recordset] when [button] is
clicked" contract to store the list data in the Orders database for both the ship
method and cost in one step.
The contract passes input parameters for originating and destination locations, as
well as the shipment weight obtained from the shopping cart, to a UPS cgi query
using the MS Internet Transfer Control. This approach allows the returned
information to be captured and manipulated within the Drumbeat page.
Note:
The ITC requires a license on the sever for the underlying ActiveX control
(MSINET.OCX). This license is given if the server machine has qualifying MS development
software installed (i.e., Visual Interdev, Visual Basic, etc).
Parameters:
Prompt is the string that appears at the top of the list to prompt a selection.
OrigCountry is the the country from which the merchant will ship the order.
Orig Zip is the the postal code from which the merchant will ship the order.
ShipCountryCol is the the name of the recordset column that contains the
shipping destination country for the customer making the order.
ShipZipCol is the the name of the recordset column that contains the shipping
destination postal code for the customer making the order.
Timeout specifies the number of seconds after which the call to the UPS server
should timeout. This allows the script to return with a refresh page prompt
rather than hang until the server script timeout is exceeded, which then gives a
nastier message and usually takes a lot longer.
Participants:
ShoppingCart
Recordset
ListElement dropdown list
Содержание 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 ...