The mgiCollectUserInfo Tag

Tag Behavior

Use the mgiCollectUserInfo tag to collect payment, billing and/or shipping information about a visitor during the shopping basket checkout process.


Tag Syntax

The mgiCollectUserInfo tag has two required parameters and three optional parameters. The tag form is:

<mgiCollectUserInfo handle="Configuration Name" 
shoppingBasketURL="URL" odbcDatasource="Source Name" 
odbcUsername="Name" odbcPassword="Password">

Required Parameters:

  • handle - The handle is the name of the shopping basket configuration to use. Shopping basket configurations are defined using the admin mode of the mgiShoppingBasket tag.
  • shoppingBasketURL - The shoppingBasketURL is the absolute address to the folder region containing the visitor's shopping basket (i.e., the region containing the mgiShoppingBasket tag that created the visitor's shopping basket).

Optional Parameters:

  • odbcDatasource (NT only) - The odbcDatasource is the name of datasource on the server that provides access information for an external ODBC database. If the odbcDatasource parameter is included, shopping basket information will be retrieved from the specified ODBC database rather than the internal MGI database. Inquire with the server administrator for additional information about the use of ODBC databases. If you include the odbcDatasource parameter, the odbcUsername and odbcPassword parameters are required.
  • odbcUsername (NT only) - The odbcUsername is the username required to access the ODBC datasource. The odbcUsername parameter is required if you include the odbcDatasource parameter.
  • odbcPassword (NT only) - The odbcPassword is the code required to access the ODBC datasource. The odbcPassword parameter is required if you include the odbcDatasource parameter.


Technical Notes

  • Default Payment, Billing and Shipping Post Arguments - The mgiCollectUserInfo tag displays tables to collect payment, billing, and shipping information. The post argument names in the tables of payment, billing and shipping information are as follows. Note: these post argument names are only created in the Automatic and Selective shopping basket methods (chosen in the mgiShoppingBasket admin).
    • PaymentMethod - Shopping basket payment method. Values include "Credit Card", "Purchase Order", and "Check".
    • CardType - Credit card type. Values include "Visa", "Mastercard", "Disover/Novus", "American Express", "Carte Blanche", "Diner's Club", "Bankcard", and/or "JCB" depending on shopping basket configuration.
    • CCNumber - Credit card number.
    • ExpMo - Credit card expiration month.
    • ExpYe - Credit card expiration year.
    • CCName - Name that appears on credit card.
    • PONumber - Purchase order number.
    • POCompany - Purchase order company.
    • BName - Billing name
    • BCompany - Billing company
    • BAddress1 - Billing address
    • BCity - Billing city
    • BState - Billing state
    • BProvince - Billing province
    • BZipCode - Billing zip code
    • BCountry - Billing country
    • BPhone - Billing phone
    • BFax - Billing fax
    • BEmail - Billing email
    • SCompany - Shipping company
    • SAddress1 - Shipping address
    • SCity - Shipping city
    • SState - Shipping state
    • SProvince - Shipping province
    • SZipCode - Shipping zip code
    • SCountry - Shipping country
    • SPhone - Shipping phone
    • SFax - Shipping fax
    • SEmail - Shipping email


Example Usage and Output

Automatic and Selective Forms

<form action="confirm.mgi" method="post">

<mgiCollectUserInfo handle="Books" 
shoppingBasketURL="http://www.domain.com/store/">

<mgiButton name="Confirm Order">

</form>

The mgiCollectUserInfo tag displays tables of customer payment, billing, and shipping information with the options defined in the "Books" configuration.

The options for the display of information appear in the Customer Information options in the admin mode of mgiShoppingBasket. In Automatic mode, all payment, billing and shipping information fields are displayed and fields are required based on whether they apply to all customers and are required to deliver an order. In Selective mode, only selected payment, billing and shipping information fields are displayed and only selected fields are required.

It is possible to use a custom form layout in the Automatic or Selective modes of the shopping basket. If you choose the Automatic or Selective shopping basket method in the mgiShoppingBasket admin AND if you maintain the field names (post argument names - listed above) of the Automatic/Selective payment, billing, and shipping forms, custom forms do not require custom mgiConfirmOrder and mgiSendOrder tags.

In Manual mode, the mgiCollectUserInfo tag should not be used. Rather, you should construct a custom form to collect payment, billing and shipping information. See below for more information about custom forms.

The default format of the payment, billing and shipping information tables follows:

Manual Form

<mgitoken>

<FORM ACTION="confirmorder2.mgi" METHOD="POST">

<P><CENTER>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" 
WIDTH="525">
<TR HEIGHT="375">
<TD WIDTH="300" HEIGHT="375" VALIGN="TOP" ALIGN="CENTER">
<P>

<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" 
WIDTH="250">
<TR HEIGHT="30">
<TD HEIGHT="30" COLSPAN="2"><B>BILLING ADDRESS</B></TD>
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT><B><FONT COLOR="#ff0000">Name*</FONT></B>
</TD> 
<TD WIDTH="175"><INPUT TYPE="text" NAME="BName" SIZE="27">
</TD> 
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT>Company</TD> 
<TD WIDTH="175"><INPUT TYPE="text" NAME="BCompany" SIZE="27">
</TD> 
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT><B><FONT COLOR="#ff0000">Address*</FONT></B>
</TD> 
<TD WIDTH="175"><INPUT TYPE="text" NAME="BAddress1" SIZE="27">
</TD> 
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT><B><FONT COLOR="#ff0000">City*</FONT></B>
</TD> 
<TD WIDTH="175"><INPUT TYPE="text" NAME="BCity" SIZE="27">
</TD> 
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT><B><FONT COLOR="#ff0000">State*</FONT></B>
</TD> 
<TD WIDTH="175"><SELECT name="BSTATE">
<OPTION>
<OPTION>Alabama
<OPTION>Alaska
<OPTION>Arizona
<OPTION>Arkansas
<OPTION>California
<OPTION>Colorado
<OPTION>Connecticut
<OPTION>Delaware
<OPTION>District of Columbia
<OPTION>Florida
<OPTION>Georgia
<OPTION>Hawaii
<OPTION>Idaho
<OPTION>Illinois
<OPTION>Indiana
<OPTION>Iowa
<OPTION>Kansas
<OPTION>Kentucky
<OPTION>Louisiana
<OPTION>Maine
<OPTION>Maryland
<OPTION>Massachusetts
<OPTION>Michigan
<OPTION>Minnesota
<OPTION>Mississippi
<OPTION>Missouri
<OPTION>Montana
<OPTION>Nebraska
<OPTION>Nevada
<OPTION>New Hampshire
<OPTION>New Jersey
<OPTION>New Mexico
<OPTION>New York
<OPTION>North Carolina
<OPTION>North Dakota
<OPTION>Ohio
<OPTION>Oklahoma
<OPTION>Oregon
<OPTION>Pennsylvania
<OPTION>Rhode Island
<OPTION>South Carolina
<OPTION>South Dakota
<OPTION>Tennessee
<OPTION>Texas
<OPTION>Utah
<OPTION>Vermont
<OPTION>Virginia
<OPTION>Washington
<OPTION>West Virginia
<OPTION>Wisconsin
<OPTION>Wyoming
</SELECT></TD> 
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT>Province</TD> 
<TD WIDTH="175"><INPUT TYPE="text" NAME="BProvince" SIZE="27">
</TD> 
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT><B><FONT COLOR="#ff0000">Zip Code*</FONT></B>
</TD> 
<TD WIDTH="175"><INPUT TYPE="text" NAME="BZipCode" SIZE="27">
</TD> 
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT>Country</TD> 
<TD WIDTH="175"><INPUT TYPE="text" NAME="BCountry" SIZE="27">
</TD> 
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT><B><FONT COLOR="#ff0000">Phone*</FONT></B>
</TD> 
<TD WIDTH="175"><INPUT TYPE="text" NAME="BPhone" SIZE="27">
</TD> 
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT>Fax</TD> 
<TD WIDTH="175"><INPUT TYPE="text" NAME="BFax" SIZE="27">
</TD> 
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT><B><FONT COLOR="#ff0000">E-mail*</FONT></B>
</TD> 
<TD WIDTH="175"><INPUT TYPE="text" NAME="BEmail" SIZE="27">
</TD> 
</TR>
<TR>
<TD WIDTH="75"></TD>
<TD WIDTH="175"></TD>
</TR>
</TABLE></P>
<P>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" WIDTH="260">
<TR HEIGHT="25">
<TD HEIGHT="25" COLSPAN="2"><B>PAYMENT INFORMATION</B></TD>
</TR>
<TR HEIGHT="20">
<TD HEIGHT="20" COLSPAN="2"><INPUT TYPE="radio"
VALUE="Credit Card" NAME="PaymentMethod"> <B>Credit Card</B>
</TD>
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT>Type</TD> 
<TD WIDTH="176">
<SELECT NAME="CardType">
<OPTION VALUE="" SELECTED>Select a Card Type
<OPTION>Visa
<OPTION>MasterCard
<OPTION>Discover/Novus
</SELECT></TD> 
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT>Number</TD> 
<TD WIDTH="176"><INPUT TYPE="text" NAME="CCNumber" SIZE="26">
</TD> 
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT>Expiration</TD> 
<TD WIDTH="176"><INPUT TYPE="text" NAME="EXPMO" SIZE="4"> /
<INPUT TYPE="text" NAME="EXPYE" SIZE="4"></TD> 
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT>Name</TD> 
<TD WIDTH="176"><INPUT TYPE="text" NAME="CCName" SIZE="26"></TD> 
</TR>
<TR HEIGHT="25">
<TD HEIGHT="25" COLSPAN="2"><INPUT TYPE="radio"
VALUE="Check" NAME="PaymentMethod"> <B>Check or Money Order</B>
</TD>
 </TR>
<TR>
<TD COLSPAN="2">&nbsp;</TD>
 </TR>
<TR>
<TD WIDTH="75"></TD>
<TD WIDTH="176"></TD>
</TR>
</TABLE>
</TD>
<TD WIDTH="300" HEIGHT="375" VALIGN="TOP" ALIGN="CENTER">
<P><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" 
WIDTH="250">
<TR HEIGHT="30">
<TD HEIGHT="30" COLSPAN="2"><B>SHIPPING ADDRESS
</B>(if different)</TD>
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT>Name</TD> 
<TD WIDTH="175"><INPUT TYPE="text" NAME="SName" SIZE="27">
</TD> 
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT>Company</TD> 
<TD WIDTH="175"><INPUT TYPE="text" NAME="SCompany" SIZE="27">
</TD> 
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT>Address</TD> 
<TD WIDTH="175"><INPUT TYPE="text" NAME="SAddress1" SIZE="27">
</TD> 
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT>City</TD> 
<TD WIDTH="175"><INPUT TYPE="text" NAME="SCity" SIZE="27">
</TD> 
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT>State</TD> 
<TD WIDTH="175"><SELECT name="SSTATE">
<OPTION>
<OPTION>Alabama
<OPTION>Alaska
<OPTION>Arizona
<OPTION>Arkansas
<OPTION>California
<OPTION>Colorado
<OPTION>Connecticut
<OPTION>Delaware
<OPTION>District of Columbia
<OPTION>Florida
<OPTION>Georgia
<OPTION>Hawaii
<OPTION>Idaho
<OPTION>Illinois
<OPTION>Indiana
<OPTION>Iowa
<OPTION>Kansas
<OPTION>Kentucky
<OPTION>Louisiana
<OPTION>Maine
<OPTION>Maryland
<OPTION>Massachusetts
<OPTION>Michigan
<OPTION>Minnesota
<OPTION>Mississippi
<OPTION>Missouri
<OPTION>Montana
<OPTION>Nebraska
<OPTION>Nevada
<OPTION>New Hampshire
<OPTION>New Jersey
<OPTION>New Mexico
<OPTION>New York
<OPTION>North Carolina
<OPTION>North Dakota
<OPTION>Ohio
<OPTION>Oklahoma
<OPTION>Oregon
<OPTION>Pennsylvania
<OPTION>Rhode Island
<OPTION>South Carolina
<OPTION>South Dakota
<OPTION>Tennessee
<OPTION>Texas
<OPTION>Utah
<OPTION>Vermont
<OPTION>Virginia
<OPTION>Washington
<OPTION>West Virginia
<OPTION>Wisconsin
<OPTION>Wyoming
</SELECT></TD> 
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT>Province</TD> 
<TD WIDTH="175"><INPUT TYPE="text" NAME="SProvince" SIZE="27">
</TD> 
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT>Zip Code</TD> 
<TD WIDTH="175"><INPUT TYPE="text" NAME="SZipCode" SIZE="27">
</TD> 
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT>Country</TD> 
<TD WIDTH="175"><INPUT TYPE="text" NAME="SCountry" SIZE="27">
</TD> 
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT>Phone</TD> 
<TD WIDTH="175"><INPUT TYPE="text" NAME="SPhone" SIZE="27">
</TD> 
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT>Fax</TD> 
<TD WIDTH="175"><INPUT TYPE="text" NAME="SFax" SIZE="27">
</TD> 
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT>E-mail</TD> 
<TD WIDTH="175"><INPUT TYPE="text" NAME="SEmail" SIZE="27">
</TD> 
</TR>
<TR>
<TD WIDTH="75"></TD>
<TD WIDTH="175"></TD>
</TR>
</TABLE></P>
<P><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" 
WIDTH="260">
<TR HEIGHT="25">
<TD HEIGHT="25" COLSPAN="2"><B>ADDITIONAL INFORMATION</B>
</TD> 
</TR>
<TR>
<TD WIDTH="75">
<P ALIGN=RIGHT>Comments</TD> 
<TD WIDTH="176">
<TEXTAREA NAME="Comments" COLS="25" ROWS="4">
</TEXTAREA></TD>
</TR>
<TR>
<TD WIDTH="75"></TD>
<TD WIDTH="176"></TD>
</TR>
<TR>
<TD WIDTH="75"></TD>
<TD WIDTH="176"></TD>
</TR>
<TR>
<TD WIDTH="75"></TD>
<TD WIDTH="176"></TD>
</TR>
</TABLE>
</TD>
</TR>
<TR HEIGHT="40">
<TD HEIGHT="40" COLSPAN="2">
<P><CENTER><mgibutton value="Confirm Order"></CENTER></TD>
</TR>
</TABLE></CENTER></P>

</FORM>

</mgitoken>

The options for the display of information appear in the Customer Information options in the admin mode of mgiShoppingBasket.

If you choose the Automatic or Selective shopping basket method in the mgiShoppingBasket admin AND if you maintain the field names (post argument names - listed above) of the Automatic/Selective payment, billing, and shipping forms, then custom forms do not require custom mgiConfirmOrder and mgiSendOrder tags.

In Manual mode, the mgiCollectUserInfo tag should not be used. Rather, you should construct a custom form to collect payment, billing and shipping information. If you choose the Manual shopping basket method OR if you use any custom field names (in any mode) in your form, you must customize the mgiConfirmOrder and mgiSendOrder tags.

The following is the display of the custom form above to collect payment, billing, and shipping information.


Suggested Usage

  • Shopping Basket


[Understanding MGI Menu] [Using MGI Menu] [Referencing MGI Menu]


[MGI Guides Main Menu] [User Guide Main Menu]