The mgiConfirmOrder Tag

Tag Behavior

Use the mgiConfirmOrder tag to display a confirmation of the visitor's order, payment, billing, and shipping information during the shopping basket checkout process.


Tag Syntax

The mgiConfirmOrder tag has a beginning tag with two required parameters and eight optional parameters, a body, and an ending tag. The tag form is:

<mgiConfirmOrder handle="Configuration Name" 
shoppingBasketURL="URL" priceRule="Price Rule Name" 
shippingRule="Shipping Rule Name" taxRule="Tax Rule Name" 
customerLocation="Location List" displayHiddenInfo="Yes/No"
odbcDatasource="Source Name" odbcUsername="Name" 
odbcPassword="Password">
Custom Order Confirmation Product Template
</mgiConfirmOrder>

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:

  • priceRule - The priceRule is the name of the price algorithm to apply to products in the final shopping basket confirmation. Price rules included in the mgiConfirmOrder tag must have a scope of "basket" in order to be applied to all products that are purchased. Price rules are defined in the admin mode of the mgiShoppingBasket tag.
  • shippingRule - The shippingRule rule is the name of the shipping algorithm to apply to products in the final shopping basket confirmation. Shipping rules included in the mgiConfirmOrder tag must have a scope of "basket" in order to be applied to all products that are purchased. Shipping rules are defined in the admin mode of the mgiShoppingBasket tag.
  • taxRule - The taxRule is the name of the tax algorithm to apply to products in the final shopping basket confirmation. Tax rules included in the mgiConfirmOrder tag must have a scope of "basket" in order to be applied to all products that are purchased. Tax rules are defined in the admin mode of the mgiShoppingBasket tag. If you include the taxRule parameter, the customerLocation parameter is required
  • customerLocation - The customerLocation is a comma delimited list of the customer's location that is used to determine the customer's tax according to the tax rule. If there is a chain of tax rules, the first location in the list should correspond to the first tax rule, the second location in the list should correspond to the second tax rule, etc. If you include the taxRule parameter, the customerLocation parameter is required.
  • displayHiddenInfo - The displayHiddenInfo parameter determines whether all post arguments posted to the page containing the mgiConfirmOrder tag are automatically created as hidden text inputs (to carry their values to the next page). If the displayHiddenInfo parameter value is "Yes", then the hidden text inputs are created. If the displayHiddenInfo parameter value is "No", then the hidden text inputs are not created. The default value is "Yes".
  • 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

  • Price, Shipping and Tax Rules - Price, shipping and tax rules can be configured in the admin mode of mgiShoppingBasket.
    • Shopping basket rules are shared across all shopping basket handles within a region.
    • Only "basket" type rules may be applied in the mgiShoppingBasket tag. Apply "item" type rules in the mgiBuyMe tag.
  • Custom Shopping Basket Display - The body of the mgiConfirmOrder tag contains a template display that is repeated for each product in the shopping basket. If the body of the mgiConfirmOrder tag is left empty, the default template will be used. To create a custom shopping basket display, use HTML, MGI, text , and the following placeholders in the body of the mgiConfirmOrder tag. The placeholders will be replaced with each product's specific information.
    • &mgiDBFieldQuantity; is the quantity of the product.
    • &mgiDBFieldQuantityMultiplier; is the quantity multiplier of the product.
    • &mgiDBFieldProductID; is the product ID.
    • &mgiDBFieldName; is the product name (short description).
    • &mgiDBFieldDescription; is the product description
    • &mgiDBFieldPrice; is the product price.
    • &mgiDBFieldShipping; is the product shipping cost.
    • &mgiDBFieldQualifier1; is the first product qualifier.
    • &mgiDBFieldQualifier2; is the second product qualifier.
    • &mgiDBFieldQualifier3; is the third product qualifier.
    • &mgiDBFieldQualifier4; is the fourth product qualifier.
    • &mgiDBFieldQualifier5; is the fifth product qualifier.
    • &mgiDBFieldWeight; is the product weight.
    • &mgiSBItemPriceTotal; is the price of a product multiplied by the quantity purchased and includes any price rules that have been applied.
    • &mgiSBItemShippingTotal; is the shipping price of a product after shipping rules have been applied.
    • &mgiSBItemTotal; is the total price of a product (price subtotal plus shipping subtotal) after price and shipping rules have been applied.
  • Variables - The mgiConfirmOrder tag sets the following page variables. The value of these page variables can be displayed anywhere on the page after the mgiConfirmOrder tag by using an mgiGet tag.
    • mgiSBSubtotal is the price of the order after the price rule(s) have been applied.
    • mgiSBTax is the tax on the order after the tax rule(s) have been applied.
    • mgiSBShippingTotal is the shipping price of the order after the shipping rule(s) have been applied.
    • mgiSBTotal is the total price of the order after all rules have been applied.
    • mgiSBPaymentInfo is a table of the customer's payment information. The mgiSBPaymentInfo variable is only available in Automatic and Selective modes of the shopping basket.
    • mgiSBBillingInfo is a table of the customer's billing information. The mgiSBBillingInfo variable is only available in Automatic and Selective modes of the shopping basket.
    • mgiSBShippingInfo is a table of the customer's shipping information. The mgiSBShippingInfo variable is only available in Automatic and Selective modes of the shopping basket.
  • Default Payment, Billing and Shipping Post Arguments - If you use the mgiCollectUserInfo tag to collect payment, billing, and shipping information, then you can display that information for confirmation by using the following post argument names with the mgiPostArgument tag.
    • 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

Default Shopping Basket

<mgiToken>

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

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

<mgiButton name="Process Order">

</form>

</mgiToken>

In this example, the mgiConfirmOrder tag will display a confirmation screen containing the customer's order, payment, billing, and shipping information with the options defined in the "Books" configuration. Any information that the customer left blank is not displayed.

The default shopping basket display of the mgiConfirmOrder tag includes the quantity, product ID, product name, product price, extended product price, subtotal, tax, shipping and total. The mgiConfirmorder tag also displays the payment, billing, and shipping information that was entered by the customer.

Custom Shopping Basket

<p><table cellpadding="5" cellspacing="1" border="0">
<tr bgcolor="#EEEECC">
<td><font size="-1" face="helvetica, arial, sans-serif">
<b>Qty</b></font></td>
<td><font size="-1" face="helvetica, arial, sans-serif">
<b>Description</b></font></td>
<td><font size="-1" face="helvetica, arial, sans-serif">
<b>Price Ea.</b></font></td>
<td><font size="-1" face="helvetica, arial, sans-serif">
<b>Item Total</b></font></td>
</tr>

<mgiConfirmOrder handle="Default" 
shoppingBasketURL="http://www.domain.com/">

<tr>
<td>&mgiDBFieldQuantity;</td>
<td><font size="-1" face="helvetica, arial, sans-serif">
&mgiDBFieldName;</font></td>
<td align="center">
<font size="-1" face="helvetica, arial, sans-serif">
$&mgiDBFieldPrice;</font></td>
<td align="center">
<font size="-1" face="helvetica, arial, sans-serif">
$&mgiSBItemPriceTotal;</font></td>
</tr>

</mgiConfirmOrder>

<tr bgcolor="#EEEECC">
<td colspan="3" align="right">
<font size="-1" face="helvetica, arial, sans-serif">
<b>Subtotal</b></font></td>
<td align="center">
<font size="-1" face="helvetica, arial, sans-serif">
<b>$<mgiGet name="mgiSBSubtotal"></b></font></td>
</tr>

<tr bgcolor="#EEEECC">
<td colspan="3" align="right">
<font size="-1" face="helvetica, arial, sans-serif">
<b>Tax</b></font></td>
<td align="center">
<font size="-1" face="helvetica, arial, sans-serif">
<b>$<mgiGet name="mgiSBTax"></b></font></td>
</tr>

<tr bgcolor="#EEEECC">
<td colspan="3" align="right">
<font size="+1" face="helvetica, arial, sans-serif">
<b>Total</b></font></td>
<td align="center">
<font size="+1" face="helvetica, arial, sans-serif">
<b>$<mgiGet name="mgiSBTotal"></b></font></td>
</tr>

</table>

<p><mgiGet name="mgiSBPaymentInfo">
<p><mgiGet name="mgiSBBillingInfo">
<p><mgiGet name="mgiSBShippingInfo">
    

If the default shopping basket does not fit with your site design, you may customize the shopping basket layout and the content of the shopping basket using the mgiConfirmOrder placeholders and variables. With a custom layout you can add font properties, cell colors, images, etc.

In a custom shopping basket, the code in the body of the mgiConfirmOrder tags is repeated for each item in the shopping basket and the placeholders are replaced with the item's specific information. After the mgiConfirmOrder tags, the shopping basket variables display information calculated from the current shopping basket contents.

Use the shopping basket variables to display the default payment, billing and shipping tables or create your own displays of the information with text, HTML and mgiPostArgument tags. If you use the mgiCollectUserInfo tag to collect payment, billing, and shipping information, then you can display that information in the by using specific post arguments (listed above under Technical Notes). However, if you created a custom form to collect payment, billing and shipping information, then use your post argument names to display that information for confirmation.

The custom shopping basket in this example displays this format:


Suggested Usage

  • Shopping Basket


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


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