Price, Shipping and Tax Basket Rules

Introduction

Rules are algorithms that MGI uses to calculate product price specials, shipping and tax. Rules can be applied on a per item basis (item rules) or across all items in the shopping basket (basket rules). Item rules apply to individual items and are entered in the mgiBuyMe tag for the specific item. Item tax rules also require parameters in the mgiConfirmOrder and mgiSendOrder tags. Basket rules apply across all items in a shopping basket and are entered in the mgiShoppingBasket, mgiConfirmOrder, and mgiSendOrder tags.

Item rules and basket rules are mutually exclusive for each type of rule. For example, you may not have an item price rule and a basket price rule, however you may have an item price rule and a basket shipping rule. All rules are configured in the web-based administration interface of the mgiShoppingBasket tag.

Price rules for an entire order include specials such as "buy $50 and get $5 off" and percentage discounts. A base shipping cost for an entire order can be entered in addition to shipping charges such as "$3 for 1 to 5 items, $5 for 6 to 10 items, etc.". Tax rules help you calculate local, state and federal taxes or any other tax on an order based on a customer's location. Tax rules can also be chained in a specific order for multiple taxes.

The following example is a shopping site for art posters that illustrates price, shipping and tax rules for entire orders (i.e. "basket rules"). This example is hard-coded products. The same principles would apply to mgiBuyMe tags with embedded product information from a database.

MGI Tags

Steps

  1. Create a shopping basket administration page in a text editor.
  2. Insert the mgiShoppingBasket tag in admin mode.
  3. Save the shopping basket administration page.
  4. FTP the shopping basket administration page to the web server running MGI.
  5. View the shopping basket administration page in a web browser.
  6. Create a shopping basket handle.
  7. Configure basket price rules.
  8. Configure basket shipping rules.
  9. Configure basket tax rules.
  10. Create product pages and open them in a text editor.
  11. Insert an mgiBuyMe tag and a submit button for each product.
  12. Save the product pages.
  13. Create a shopping basket page and open it in a text editor.
  14. Insert the mgiShoppingBasket tag, rule parameters and mgiButton tag.
  15. Save the shopping basket page.
  16. Create a check out page and open it in a text editor.
  17. Insert the mgiCollectUserInfo tag and mgiButton tags.
  18. Save the check out page.
  19. Create a confirm order page and open it in a text editor.
  20. Insert the mgiConfirmOrder tag, rule parameters, customerLocation parameter and mgiButton tag.
  21. Save the confirm order page.
  22. Create an order processing page and open it in a text editor.
  23. Insert the mgiSendOrder tag, rule parameters and customerLocation parameter.
  24. Save the order processing page.
  25. Tokenize all other pages of the web site.
  26. Save the web site pages.
  27. FTP all pages to the web server running MGI.
  28. View a product page in a web browser and purchase a product.


Step 1: Create a shopping basket administration page in a text editor.

Create a new page in a text editing program to display the web-based, shopping basket administration interface.

Step 2: Insert the mgiShoppingBasket tag in admin mode.

On the shopping basket administration page, enter the mgiShoppingBasket tag and mode parameter. In the mode parameter, enter "admin".
<mgiShoppingBasket mode="admin">

Step 3: Save the shopping basket administration page.

Save the shopping basket administration page and name it "sbadmin.mgi".

Step 4: FTP the shopping basket administration page to the web server running MGI.

Upload the shopping basket administration page (sbadmin.mgi) from your local computer to the web server using an FTP program.

Step 5: View the shopping basket administration page in a web browser.

View the shopping basket administration page (sbadmin.mgi) in a web browser. The first screen of the web-based, administration interface is displayed.

Step 6: Create a shopping basket handle.

Below the column "Shopping Basket Name", enter the name of a shopping basket handle and click the "Add" button. In this example, the shopping basket handle is named "Wholesale". The shopping basket handle determines the configuration of a shopping basket (you may have and use multiple shopping basket handles in one region). For a default shopping basket configuration, the handle does not require customization and merely needs to be created. Price, shipping, and tax rules require configuration of the shopping basket handle.

Step 7: Configure basket price rules.

To configure the shopping basket handle (name), click the "Edit" button beside the shopping basket name to display the configuration interface:

Click the "Edit" button beside "Price Rules" to display the price rules interface. Notice there are six pre-configured price rules. All pre-configured price rules are item rules and therefore cannot be used for an order discount (basket rules).
 
To create a custom price rule, enter a name for the price rule and click the "Add Rule" button. For this example, create a price rule named "5dollars" to use for an order discount.

To configure the price rule, click the "Edit" button beside the price rule to display the price rule configuration interface. The price rule configuration provides selections for almost any price rule algorithm. The options for a price rule segment are the scope of the price rule (item or basket), the beginning and ending break points of the price rule, the dollar or percentage discount, the units required for the discount, and the unit of measurement for the discount (item quantity, item price or item weight). Multiple segments of a price rule allow you to configure multiple break points or multiple conditions. Price rules are performed as they are entered from top to bottom.
 
In this example, the "5dollars" price rule will discount a basket $5 when the customer purchases at least $50 of merchandise.
 
To configure the price rule. The scope of the discount is a basket. The beginning break point is 50 dollars (when the discount is applied) and there is not an ending break point (i.e., "0"). The discount itself is 5 dollars. The discount is not applied to each item from the beginning break point to the ending break point (the discount only applies once when the beginning break point is reached), therefore the discount applies to zero units of dollar amount.

Click the "Save" button to save the price rule configuration and return to the price rules interface.

Step 8: Configure basket shipping rules.

Return to the main configuration interface for the "Wholesale" shopping basket handle by clicking the "Back" button under the "Operation" column. Click the "Edit" button beside "Shipping Rules" to display the shipping rules interface.
 
To create a custom shipping rule, enter a name for the shipping rule and click the "Add Rule" button. For this example, create a shipping rule named "scheduleA" to offer a shipping schedule based on the total number of items purchased.

To configure the shipping rule, click the "Edit" button beside the shipping rule to display the shipping rule configuration interface.
 
The shipping rule configuration provides a selection for an overall base shipping cost (in addition to other item or basket shipping charges). The options for a shipping rule segment are the scope of the shipping rule (item or basket), the base shipping cost, the beginning and ending break points of the shipping rule, the dollar or percentage shipping charge, the units required to incur the shipping charge and the unit of measurement basis of the shipping charge. Multiple segments of a shipping rule allow you to configure multiple break points or multiple conditions. Shipping rules are performed as they are entered from top to bottom.
 
For this example, the shipping schedule is based on the total number of items purchased:
  • $7 for 1 to 5 items.
  • $5 for 6 to 10 items
  • $3 for 11 to 15 items
  • Free for 16 or more items
 
To create this shipping schedule, each shipping "condition" will be configured as a segment of the "scheduleA" shipping rule. Add 3 additional segements (for a total of 4). To add a segment, click the "Add Segment" button.
 
In the first segment, configure the shipping charges for 1 to 5 total items. The scope of the shipping charge is a basket. The base shipping cost is zero. The beginning break point is 1 and the ending break point is 5. The shipping charge is 7 dollars. The shipping charge is not applied to each item from the beginning break point to the ending break point (the charge only applies once when the beginning break point is reached), therefore the charge applies to zero units of quantity.
 
In the second segment, configure the shipping charges for 6 to 10 total items. The scope of the shipping charge is a basket. The base shipping cost is zero. The beginning break point is 6 and the ending break point is 10. The shipping charge is 5 dollars. The shipping charge is not applied to each item from the beginning break point to the ending break point (the charge only applies once when the beginning break point is reached), therefore the charge applies to zero units of quantity.
 
In the third segment, configure the shipping charges for 11 to 15 total items. The scope of the shipping charge is a basket. The base shipping cost is zero. The beginning break point is 11 and the ending break point is 15. The shipping charge is 3 dollars. The shipping charge is not applied to each item from the beginning break point to the ending break point (the charge only applies once when the beginning break point is reached), therefore the charge applies to zero units of quantity.
 
In the fourth segment, configure the shipping charges for 15 or more total items. The scope of the shipping charge is a basket. The base shipping cost is zero. The beginning break point is 15 and there is no ending point (i.e., "0"). The shipping charge is 0 dollars (it's free!). The shipping charge is not applied to each item from the beginning break point to the ending break point (the charge only applies once when the beginning break point is reached), therefore the charge applies to zero units of quantity.

Click the "Save" button to save the shipping rule configuration and return to the shipping rules interface.

Step 9: Configure basket tax rules.

Return to the main configuration interface for the "Wholesale" shopping basket handle by clicking the "Back" button under the "Operation" column. Click the "Edit" button beside "Tax Rules" to display the tax rules interface.
 
For this example, the tax charge is 2% for city sales tax and 4% for state sales tax the total dollar amount of the basket. Each tax charge is entered as a separate tax rule, but the tax rules can be "chained" together to charge multiple taxes. Multiple segments of a tax rule can be added to charge taxes for multiple locations. For example, if you are charging a different state tax for North Carolina and South Carolina, you would enter two segments to the "stateWS" tax rule.
 
Create two new tax rules. Name the first tax rule, "cityWS" and the second tax rule "stateWS". To create a custom tax rule, enter a name for the tax rule and click the "Add Rule" button.

To configure a tax rule, click the "Edit" button beside the tax rule. The options for a tax rule are the scope of the tax rule (item or basket), the percentage tax charge, the location(s) receiving the tax charge and the next tax rule to apply in the chain.
 
Configure the "stateWS" tax rule as a 4% tax for residents of North Carolina (NC). The scope of the tax charge is a basket. The tax charge is 4 percent. The location of the tax charge is North Carolina. Multiple locations or multiple values should be entered as a comma-delimited list (e.g., "North Carolina, NC"). After the "state" tax is applied for North Carolina, continue to the "cityWS" tax rule. Click "Save" to save the tax rule and return to the tax rules interface.

Configure the "cityWS" tax rule as a 2% tax for residents of Raleigh. The scope of the tax charge is a basket. The tax charge is 2 percent. The location of the tax charge is Raleigh. Multiple locations or multiple values should be entered as a comma-delimited list. After the "city" tax is applied for North Carolina, no additional taxes are charged. Click "Save" to save the tax rule and return to the tax rules interface.

Close the shopping basket admin page.

Step 10: Create product pages and open them in a text editor.

Create pages to display products for sale. You may choose any design and layout for products including pictures, descriptions, pricing information, etc. Insert placeholders for a quantity box for each product and a submit button. The default quantity box is 3 characters wide. Finally, open your product pages in a text editing program that allows you to view and modify the HTML and code of the page.

Step 11: Insert an mgiBuyMe tag and a submit button for each product.

Replace the quantity box placeholder for each product with an mgiBuyMe tag, productID parameter, name parameter, and price parameter. In the productID parameter, enter a unique code for the product or embed the product's unique ID from a database search. Product information is tracked through the shopping basket by the productID. In the name parameter, enter a short description of the product or embed the product's short description from a database search. In the price parameter, enter the per item price of each product as a decimal number or embed the product's price from a database search. Do not enter characters such as dollar signs in the price parameter.
 
Replace the submit button placeholder for each item (or for all items) with an mgiButton tag and value parameter. In the value parameter, enter the value that will display on the submit button (e.g., "Add to Shopping Basket").
 
A form action adds the quantity entered in the quantity box(s) to the shopping basket page for processing when the submit button is clicked. Enter the name of the shopping basket page (basket.mgi) in the action parameter of the <FORM> tag. Enter "post" in the method parameter of the <FORM> tag. Enclose the mgiBuyMe tag and "Add to Shopping Basket" submit button for each item with HTML form tags. If you want to allow customers to add multiple items to a shopping basket at one time, enclose all mgiBuyMe tags and a single submit button or multiple submit buttons with HTML form tags.
 
The default shopping basket uses tokens to track the purchases of individual customers. Enter one beginning mgiToken tag before all products and submit buttons, and enter one ending mgiToken tag after all products and submit buttons. The mgiToken tags should enclose all links on the page including HREFs and FORM actions.
 
The following is an example product page.
<mgiToken>

<P><CENTER>

<TABLE WIDTH="500" CELLPADDING="3" 
CELLSPACING="2">
<TR><TD WIDTH="33%" VALIGN="TOP">

<FORM ACTION="basket.mgi" METHOD="POST">
<P><CENTER><B><FONT SIZE="+1">The Race
</FONT></B>
</CENTER></P>
<P><CENTER>
<IMG SRC="images/GCL632S.JPG" BORDER="0" 
WIDTH="150" HEIGHT="100" ALIGN="BOTTOM">
<BR>Item: GCL632 
<BR>Artist: Johansen 
<BR>24&quot; x 36&quot; 
<BR><MGIBUYME PRODUCTID="GCL632" 
NAME="The Race" PRICE="16.00">
@ $16.00 ea. 
<BR><MGIBUTTON VALUE="Buy Now!">
</CENTER>
</FORM>

</TD>
<TD WIDTH="33%" VALIGN="TOP">

<FORM ACTION="basket.mgi" METHOD="POST">
<P><CENTER>
<B><FONT SIZE="+1">Composition No. 6
</FONT></B>
</CENTER></P>
<P><CENTER>
<IMG SRC="images/GCL641S.JPG" BORDER="0" 
WIDTH="150" HEIGHT="100" ALIGN="BOTTOM">
<BR>Item: GCL641 
<BR>Artist: Kandinsky 
<BR>24&quot; x 36&quot; 
<BR><MGIBUYME PRODUCTID="GCL641" 
NAME="Composition No. 6" PRICE="16.00">
@ $16.00 ea. 
<BR><MGIBUTTON VALUE="Buy Now!">
</CENTER>
</FORM>

</TD>
</TR>
</TABLE>

</CENTER>
</P>

</mgiToken>

Step 12: Save the product pages.

Save the changes you have made to the product pages.

Step 13: Create a shopping basket page and open it in a text editor.

Create a page named "basket.mgi" to display the contents of a customer's shopping basket and open the page in a text editing program that allows you to view and modify the HTML and code.

Step 14: Insert the mgiShoppingBasket tag, rule parameters and mgiButton tag.

Insert your cursor in the HTML of the shopping basket page where you want the shopping basket to display and enter the beginning mgiShoppingBasket tag, handle parameter, rule parameters and ending mgiShoppingBasket tag. In the handle parameter, enter the name of the shopping basket handle you created in the shopping basket administration (i.e., "Wholesale").
 
When implementing a basket price rule, you must include the priceRule parameter in the mgiShoppingBasket tag. In the priceRule parameter, enter the name of the price rule to apply to the basket.
 
When implementing a basket shipping rule, you must include the shippingRule parameter in the mgiShoppingBasket tag. In the shippingRule parameter, enter the name of the shipping rule to apply to the basket.
 
Below the mgiShopping basket tag, enter an mgiButton tag and value parameter. In the value parameter, enter the value that will display on the submit button to modify shopping basket quantities (e.g., "Modify Quantity").
 
Below the mgiShoppingBasket tag and modify quantity button, enter a second mgiButton tag and value parameter. In the value parameter, enter the value that will display on the submit button to proceed to the check out page (e.g., "Check Out").
 
On the shopping basket page, form actions perform two functions. One form action modifies the contents of the shopping basket (i.e., changes quantities). Enclose the mgiShoppingBasket tag and mgiButton tag used to modify the shopping basket with HTML form tags. Enter the name of the shopping basket page (basket.mgi) in the action parameter of the <FORM> tag and enter "post" in the method parameter of the <FORM> tag.
 
Another form action links customers to the check out page to enter payment, billing and shipping information. Enclose the mgiButton tag used to check out with HTML form tags. Enter the name of the check out page (checkout.mgi) in the action parameter of the <FORM> tag and enter "post" in the method parameter of the <FORM> tag. Note: To use a secure server to collect payment information, enter the URL to a secure server running MGI in the action parameter of the <FORM> tag (e.g., https://secure.domain.com/checkout.mgi). You may substitute a text link for the check out button and form tags.
 
The default shopping basket uses tokens to track the purchases of individual customers. Enter a beginning mgiToken tag before the first HTML form tag and enter an ending mgiToken tag after the last closing HTML form tag. The mgiToken tags should enclose all links on the page including HREFs and FORM actions.
 
The following is an example shopping basket page.
<mgiToken>

<center>

<h2>Shopping Basket</h2>

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

<p><mgiShoppingBasket handle="Wholesale" 
priceRule="5dollars">
</mgiShoppingBasket>

<p><mgiButton value="Modify Quantity">

</form>

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

<mgiButton value="Check Out">

</form>

</center>

</mgiToken>
The default shopping basket contents display in a table with columns for product removal, product quantity, product ID, product name, product price, multiplied product subtotals and order total. Price discounts are deducted and displayed in the "Total" price.

Step 15: Save the shopping basket page.

Save the changes you have made to the shopping basket page (basket.mgi).

Step 16: Create a check out page and open it in a text editor.

Create a page named "checkout.mgi" to collect payment, billing and shipping information from the customer and open the page in a text editing program that allows you to modify the HTML and code of the page.

Step 17: Insert the mgiCollectUserInfo and mgiButton tags.

Insert your cursor in the HTML of the check out page where you want the payment, billing and shipping information tables to display and enter the mgiCollectUserInfo tag, handle parameter and shoppingBasketURL parameter. In the handle parameter, enter the name of the shopping basket handle you created in the shopping basket administration (i.e., "Wholesale"). In the shoppingBasketURL parameter, enter the full URL to the region where items were added to the shopping basket (and thus where the internal MGI shopping basket database was created and populated).
 
Below the mgiCollectUserInfo tag, enter an mgiButton tag and value parameter. In the value parameter, enter the value that will display on the submit button to proceed to the order confirmation page (e.g., "Confirm Order").
 
Form actions on the check out page link customers to the order confirmation page to review their order and customer information. Enclose the mgiCollectUserInfo tag, mgiButton tag, and any custom form elements with HTML form tags. Enter the name of the order confirmation page (confirm.mgi) in the action parameter of the <FORM> tag and enter "post" in the method parameter of the <FORM> tag.
 
The default shopping basket uses tokens to track the purchases of individual customers. Enter a beginning mgiToken tag before the beginning HTML form tag and enter an ending mgiToken tag after the ending HTML form tag. The mgiToken tags should enclose all links on the page including HREFs and FORM actions.
 
The following is an example check out page.
<mgiToken>

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

<center>

<mgiCollectUserInfo handle="Wholesale" 
shoppingBasketURL="http://www.domain.com/shop/">

<p><mgiButton value="Confirm Order">

</center>

</form>

</mgiToken>
The default check out page display payment, billing and shipping information in tables. Custom form elements appear as you format them.

Step 18: Save the check out page.

Save the changes you have made to the check out page.

Step 19: Create a confirm order page and open it in a text editor.

Create a page named "confirm.mgi" to present the final shopping basket, payment information, billing information, and shipping information for review. Open the confirm order page in a text editing program that allows you to view and modify the HTML and code of the page.

Step 20: Insert the mgiConfirmOrder tag, rule parameters, customerLocation parameter and mgiButton tag.

Insert your cursor in the HTML of the confirm order page where you want the shopping basket, payment, billing, shipping, and additional information tables to display and enter the beginning mgiConfirmOrder tag, handle parameter, shoppingBasketURL parameter, rule parameters, customerLocation parameter and ending mgiConfirmOrder tag.
 
In the handle parameter, enter the name of the shopping basket handle you created in the shopping basket administration (i.e., "Wholesale"). In the shoppingBasketURL parameter, enter the full URL to the region where items were added to the shopping basket (and thus where the internal MGI shopping basket database was created and populated).
 
When implementing a basket price rule, you must include the priceRule parameter in the mgiConfirmOrder tag. In the priceRule parameter, enter the name of the price rule to apply to the basket.
 
When implementing a basket shipping rule, you must include the shippingRule parameter in the mgiConfirmOrder tag. In the shippingRule parameter, enter the name of the shipping rule to apply to the basket.
 
When implementing a basket tax rule, you must include the taxRule parameter in the mgiConfirmOrder tag. In the taxRule parameter, enter the name of the tax rule to apply to the basket. For tax rules, you must also collect the customer's location(s) from their billing information and embed it in the customerLocation parameter of the mgiConfirmOrder parameter. For "chained" tax rules, embed a comma-delimited list of the customer's location from the top-level tax rule to the bottom-level tax rule. The location list must be in the same order as the tax rule chain. Create the comma-delimited list in a variable (using mgiSet) before the mgiConfirmOrder tag and embed the variable in the customerLocation parameter of the mgiConfirmOrder tag (using mgiGet). In this example, the customer's state and city are compiled in a variable and embedded in the customerLocation parameter.
 
Below the mgiConfirmOrder tag, enter an mgiButton tag and value parameter. In the value parameter, enter the value that will display on the submit button to proceed to the final order processing page (e.g., "Complete Order").
 
Form actions on the confirm order page link customers to the order processing page to complete and send their order. Enclose the mgiConfirmOrder tag and mgiButton tag with HTML form tags. Enter the name of the order processing page (process.mgi) in the action parameter of the <FORM> tag and enter "post" in the method parameter of the <FORM> tag.
 
The default shopping basket uses tokens to track the purchases of individual customers. Enter a beginning mgiToken tag before the beginning HTML form tag and enter an ending mgiToken tag after the ending HTML form tag. The mgiToken tags should enclose all links on the page including HREFs and FORM actions.
 
The following is an example confirm order page.
<mgiToken>

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

<center>

<mgiSet name="locations">
<mgiPostArgument name="bSTATE">,<mgiPostArgument 
name="bCITY">
</mgiSet>

<mgiConfirmOrder handle="Wholesale" 
shoppingBasketURL="http://www.domain.com/shop/" 
priceRule="5dollars" shippingRule="scheduleA" 
taxRule="stateWS"
customerLocation={mgiGet name="locations"}>
</mgiConfirmOrder>

<p><mgiButton value="Complete Order">

</center>

</form>

</mgiToken>
The default confirm order page displays completed elements of the payment, billing and shipping information. The confirm order page also displays the calculated price (reflected in the Subtotal), shipping and tax charges.

Step 21: Save the confirm order page.

Save the changes you have made to the confirm order page.

Step 22: Create an order processing page and open it in a text editor.

Create an page named "process.mgi" to present a "thank you for purchasing" message to customers and to send a formatted email of the order to a specified address. Open the order processing page in a text editing program that allows you to view and modify the HTML and code of the page.

Step 23: Insert the mgiSendOrder tag, rule parameters and customerLocation parameter.

Enter a "thank you" message to display to customers when they complete their order.
 
At any place on the order processing page, enter a beginning mgiSendOrder tag, handle parameter, shoppingBasketURL parameter, rule parameters, customerLocation parameter, to parameter, from parameter, mailServer parameter, subject parameter, and ending mgiSendOrder tag.
 
In the handle parameter, enter the name of the default handle you created in the shopping basket administration (i.e., "Posters"). In the shoppingBasketURL parameter, enter the full URL to the region where items were added to the shopping basket (and thus where the internal MGI shopping basket database was created and populated).
 
When implementing a basket price rule, you must include the priceRule parameter in the mgiSendOrder tag. In the priceRule parameter, enter the name of the price rule to apply to the basket.
 
When implementing a basket shipping rule, you must include the shippingRule parameter in the mgiSendOrder tag. In the shippingRule parameter, enter the name of the shipping rule to apply to the basket.
 
When implementing a basket tax rule, you must include the taxRule parameter in the mgiSendOrder tag. In the taxRule parameter, enter the name of the tax rule to apply to the basket. For tax rules, you must also collect the customer's location(s) from their billing information and embed it in the customerLocation parameter of the mgiSendOrder parameter. For "chained" tax rules, embed a comma-delimited list of the customer's location from the top-level tax rule to the bottom-level tax rule. The location list must be in the same order as the tax rule chain. Create the comma-delimited list in a variable (using mgiSet) before the mgiSendOrder tag and embed the variable in the customerLocation parameter of the mgiSendOrder tag (using mgiGet). In this example, the customer's state and city are compiled in a variable and embedded in the customerLocation parameter.
 
In the "to" parameter, enter the email address to receive shopping basket orders. In the "from" parameter, enter the email address that appears in the "from" line of shopping basket orders. In the mailServer parameter, enter the address for the outgoing SMTP mail server of your domain (e.g., mail.domain.com). In the subject parameter, enter the subject of the order email. The mgiSendOrder tag does not display information to the customer.
 
The following is an example order processing page.
<center>

<h2>Order Complete</h2>

<p>Thank you for ordering.  Your order has been 
processed and you should receive the merchandise 
within 2 to 4 weeks.

<mgiSet name="locations">
<mgiPostArgument name="bSTATE">,<mgiPostArgument 
name="bCITY">
</mgiSet>

<mgiSendOrder handle="Posters"
shoppingBasketURL="http://www.domain.com/shop/" 
to="sales@domain.com" from="webmaster@domain.com" 
mailServer="mail.domain.com"
subject="Online Order" 
priceRule="5dollars" shippingRule="scheduleA" 
taxRule="stateWS"
customerLocation={mgiGet name="locations"}>
</mgiSendOrder>

</center>
The default order email is formatted with payment, billing, shipping, and order information.
Payment Information
-------------------
 Payment Method:  Credit Card
           Type:  Mastercard
         Number:  1234658945872153
Expiration Date:  01/2008
           Name:  Jenna Wallace

Billing Information
-------------------
           Name:  Jenna Wallace
        Address:  8839 South Street
           City:  Raleigh
          State:  NC
       Zip Code:  27516
        Country:  US
          Phone:  919-562-4586
          Email:  jwallace@aol.com

Product Information
--------------------
       Quantity:  2
     Product ID:  ARV759
           Name:  Sailboats at Argenteuil
    Total Price:  $24.00
 
       Quantity:  2
     Product ID:  GCM550
           Name:  The Starry Night
    Total Price:  $28.00
 
       Quantity:  1
     Product ID:  GCL632
           Name:  The Race
    Total Price:  $16.00
 
       Subtotal:  $63.00
            Tax:  $3.78
       Shipping:  $7.00
          Total:  $73.78

Step 24: Save the order processing page.

Save the changes you have made to the order processing page.

Step 25: Tokenize all pages of the web site.

The default shopping basket uses tokens to track the purchases of individual customers. Using a text editor, enter a beginning mgiToken tag and ending mgiToken tag on all additional pages of the web site. The mgiToken tags should enclose all links on the pages including HREFs and FORM actions.
<mgiToken>
All tags and links appear here.
</mgiToken>

Step 26: Save the web site pages.

Save the changes that you make as you tokenize each page.

Step 27: FTP all pages to the web server running MGI.

Upload all pages of the web site to the web server using an FTP program. If you are using a secure server, upload only the check out, order confirmation and order processing pages to the secure portion of your web site. Do not attempt to use the shopping basket page on a secure server.

Step 28: View a product page in a web browser and purchase a product.

View a product page in a web browser. Enter a quantity to purchase in the quantity text field and click the "Add to Shopping Basket" button. The item(s) appears in the shopping basket display on the shopping basket page. Click the "Check Out" button to proceed to the check out page. On the check out page, enter a payment choice, billing information and shipping information (if it is different). Click the "Confirm Order" button to proceed to the confirm order page. On the confirm order page, review your order, payment information, billing information and shipping information, then click the "Complete Order" button to complete the ordering process. The message from the order processing page is displayed and the shopping basket order is formatted and emailed.


[Return to the Shopping Online Menu]


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


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