The mgiBuyMe Tag

Tag Behavior

The mgiBuyMe tag creates a quantity box (text field) of a specified size or a checkbox that contains the productID, brief description, price, and shipping information for an individual product for sale.


Tag Syntax

The mgiBuyMe tag has four required parameters and four optional parameters. The tag form is:

<mgiBuyMe productID="Product Code"
briefDescription="Product Description" price="Decimal Number"
shippingCost="Decimal Number" quantitySize="Whole Number"
singleItemCheckbox="Yes/No" defaultValue="Integer" hidden="Yes/No">

Required Parameters:

  • productID="Product Code" where "Product Code" is a unique alpha-numeric identification for each product with an mgiBuyMe tag. The "Product Code" may contain spaces. The "Product Code" is not case-sensitive, therefore matching product identifications with different capitalization that are not unique (e.g. "prod1" and "PROD1" are parsed as being identical).
  • briefDescription="Product Description" where "Product Description" is a brief description of the product being sold. The description may contain spaces.
  • price="Decimal Number" where "Decimal Number" is the price of the product with two decimal places. DO NOT use dollar signs ($) or other non-number characters in the price parameter. Those characters can be added in other text that displays the price of products, as shown in the example below.
  • shippingCost="Decimal Number" where "Decimal Number" is the shipping price of the individual product. DO NOT use dollar signs ($) or other non-number characters in the shippingCost parameter. Those characters can be added in other text that displays the shipping cost of products, as shown in the example below. If there is no shipping cost, you must enter "0.00" in this parameter.

Optional Parameters:

  • quantitySize="Whole Number" where "Whole Number" is the size in characters of the quantity field that is displayed. The default value is six.
  • singleItemCheckbox="Yes" or "No" where "Yes" indicates that a single-item checkbox rather than a text field appears at the location of the mgiBuyMe tag and where "No" indicates that a text field appears at the location of the mgiBuyMe tag. The default is "No". When an item is added to a shopping basket using a checkbox, a quantity of one for the specified product is added to the shopping basket
  • defaultValue="Integer" where "Integer" is a default whole number that appears in the quantity field that is displayed by the mgiBuyMe tag. If the quantity box is hidden, the default value is added to the shopping basket for the product. If the defaultValue parameter is not included, the quantity field is empty.
  • hidden="Yes" or "No" where "Yes" indicates that the quantity field is hidden and "No" indicates that the quantity field is displayed. If the quantity field is hidden, a default value of "1" is added to the shopping basket. Unless the singleItemCheckbox parameter is included, the default value of the hidden field can be customized with the defaultValue parameter.


Example Usage and Output

Purchase 
<mgiBuyMe productID="102917-G3" 
briefDescription="Apple iMac G3/233 MHz" price="1199.00" 
shippingCost="20.25" quantitySize="3"> iMacs at 
$1199.00 plus shipping!

A quantity field with a size of three characters would appear in the location of the mgiBuyMe tag. For example,

Purchase iMacs at $1199.00 plus shipping!


Suggested Usage

  • Hard-Coded Shopping Basket


[Return to the Referencing MGI Menu]


[User Guide Main Menu] [Understanding MGI Menu] [Using MGI Menu] [Referencing MGI Menu]