iisCART Documentation | ![]() |
iisCART METHODS |
AddToCart( Optional ItemID, Optional Quantity) |
Adds an item to the
cart. If ItemID is not specified the method will look for the Request("ItemID")
value. If the value is not found, the method will do nothing. If Quantity is not
specified, the method will look for the value Request("Quantity"). If the value
is not found, it will assume the value 1. Additional parameters that are not expected by the method are stored as custom properties (1 through 5). ItemID must be present in the Items database table. |
EmptyCart |
Removes all items from the cart. |
DisplayCart(DoNotShow as String, Optional ShowCustom, Optional ImagePath) |
Displays the cart content as a table with an "Update" button at the bottom. Handles remove and update commands from the user. DoNotShow contains a list of comma-separated header names that should not be shown, e.g. "Description, Item ID". ShowCustom specified the header names for Cusom1 to Custom5 fields to be displayed in the table. This parameter may contain 0 to 5 comma-separated names. By default, the method will not display custom fields. ImagePath specifies the path to an image that will be served as the "Update Cart" button. If this parameter is omitted, a regular "SUBMIT" button will be displayed. |
DisplayCartReadOnly(DoNotShow as String, Optional ShowCustom) |
Same as DisplayCart but does not display the Remove column or Update Cart button. |
SetTableProperties(Width As String, CellPadding As Integer, CellSpacing As Integer, Border As Boolean) |
Sets WIDTH, CELLPADDING, CELLSPACING, and BORDER properties of the Cart tables <TABLE> tag. If this method is not called, the attributes will be omitted. |
SetFont(Face As String, Optional Size, Optional Color) |
Sets the FACE, SIZE and COLOR attributes of the <FONT> tag for all text displayed in the cart table. |
AcceptShippingInfo As String |
Call this method to
accept the shipping info coming from an HTML form containing the following input
variables: BILLINGSAMEASSHIPPING, STATERESIDENT, COUNTRYRESIDENT, SHIPNAME, SHIPCOMPANY, SHIPADDRESS1, SHIPADDRESS2, SHIPADDRESS3, SHIPCITY, SHIPSTATEPROVINCE, SHIPZIPPOSTAL, SHIPCOUNTRY, SHIPEMAIL, SHIPPING. This method retrieves the input variables listed above from an HTML form. It calculates state and country taxes based on the tax rates and whether the STATERESIDENT and COUNTRYRESINDENT checkboxes are checked. It also calculates the shipping value based on the info in the SHIPPING variable. The method returns a list of fields that it considers "required" and that were not specified by the user. The "required" fields are SHIPNAME, SHIPADDRESS1, SHIPCITY, SHIPZIPPOSTAL, SHIPCOUNTRY. You may ignore the return value and write your own validation script after or before calling this method. |
CC As Object |
Returns a CreditCard auxiliary object that can be used to set various properties of the CC processing module. |
SaveOrder |
Saves the order information into the database. General order data such as shipping and billing addresses etc. go to the Orders table. Information on individual items in the cart goes to OrderItems table. |
LoadOrder |
Loads the order info from the database. This method needs to be called when secure credit card info is about to be collected and an SSL session is started. This method looks for Request("ItemID") value to retrieve the correct order info from the database. |
AcceptBillingInfo As String |
Similar to
AcceptShippingInfo. Retrieves the following input values from an HTML form: NAME, COMPANY, ADDRESS1, ADDRESS2, ADDRESS3, CITY, STATEPROVINCE, ZIPPOSTAL, COUNTRY, EMAIL, CCTYPE, CCNUMBER, CCNAME, PHONE, CCMONTH, CCYEAR. This method considers the following values "required": NAME, ADDRESS1, CITY, ZIPPOSTAL, COUNTRY, CCTYPE, CCNAME, CCNUMBER, CCMONTH, CCYEAR, PHONE. Returns a list of missing variables. You may ignore the return value and write your own validation script before or after calling this method. |
SaveBillingInfo |
Saves billing info in the Orders table. |
VerifyCreditCard(Processor As String, Optional TestMode) As Integer |
This method requires the seperate CC module. It creates an instance of the CC module, passes appropriate parameters to it and calls its validation method. Processor is one of many parameters that the CC module requires. TestMode, if set to 0, enables CC modules test mode. Returns 0 if the card was successfully cleared. Returns 1 if the card was declined. Returns 2 if there were problems with the input data passed to CC module (such as an invalid credit card number) and no attempt was made to clear the card. In the latter case, the numeric and verbal results of this method call are found in the LastCCError and LastCCErrorMsg. |
SendEmail or Mail.Send |
See the subroutine in billing.asp. The component allows you to use the bundled aspemail or your favorite SMTP mail component. iisCART's collections of data are accessed to build up a receipt which is then sent out to the billing and shipping address as well as an optional internal address (fulfillment). |
DisplayItems |
An auxiliary method which provides Web interface for the Items table. The usage is illustrated in the file DisplayItems.asp. |
© Corporate Web Solutions 1998, 1999. | ![]() |