Legends:
- Bold= Required
- Italics = Optional
- Red = eSellerate HTML extensions

eSellerate commands, tags, and expressions are case insensitive (except for string comparisons).

 eSellerate Commands
_Cmd="Buy" _SkuRefNum="SkuRefNum" _CsGroupRefNum=_CrossSellItem.GroupRefNum _Page="YourCartPage.htm"
_Cmd="Goto" _Page="AnyPage.htm"
_Cmd="SubmitOrder" _FailurePage="YourErrorPage.htm" _CancelPage="YourConfirmPage.htm"
_Cmd="Remove_SkuRefNum="SkuRefNum"
_Cmd="ClearCart"
Button <input type="submit" _Cmd="Goto" _Page="cart.htm" value="Show Shopping Cart">
Hyperlink <a target="_blank" _Cmd="Buy" _SkuRefNum="SKU172837" _Page="cart.htm">Text or Image</a>
Image <img src="images/esellerate_affiliates.gif" _Cmd="Buy" _SkuRefNum="SKU1849372" _Page="Cart" width="85" height="99" border="0">

 eSellerate Tags
Loop eSellerate <_Loop> tags can be used to dynamically repeat sections of a page. Loops can read or set values for any eSellerate variable marked "Loop-only" on the Variables page.

Each loop structure begins with "_Loop Var=" to specify the prefix used by all variables in the loop.
The number of times through the loop is determined by the total index, which in the examples below would be the total number of catalog items or cart items.

<table>
<_Loop Var=
_Catalog Columns=2>
<_Row>
  <tr>
  <_Column>
      <td>
         _CatalogItem.SkuName<br>
         _CatalogItem.Description
       </td>
  </_Column>
  </tr>
</_Row>
</_Loop>
</table>
<table>
<_Loop Var=_Cart
Columns=1>
<_Row><_Column>
  <tr>
      <td>_CartItem.SkuName</td>
      <td>_CartItem.PriceEach</td>
  </tr>
</_Column></_Row>
</_Loop>
</table>
Conditionals Expressions can be used in <Span> tags and _Visible attribute to conditionally include sections of HTML on a page.

In the following examples, "Shippable item" will display only if the referenced catalog item requires shipping, "Discount Info" will display only if the quantity of the referenced cart item is greater than 5, and so on.

<Span _If="_CatalogItem.RequiresShipping">Shippable item</Span>
<Span _If=" _CartItem.Quantity > 5">
Discount Info</Span>
<Span _If="_Shopper.BillingFirstName IN ['a', 'b', 'c']" >
Yes</Span>
<Span _If="NOT ("SKU18293" IN [ _Cart.ItemIDList ] )" >
Yes</Span>

Expressions can also be included as _Visible attribute in tags. Example:
<input type="submit" _Cmd="Buy" _SkuRefNum="eCD.SkuRefNum" value="Add eCD to Cart" _Visible="_eCD.IsOffered" >
Input Validation <Input> fields can be attributed _Required to ensure that the field input is not left blank.

Also, the field input of <Input> fields can be validated against a regular expression representing the allowed format by assigning the regular expression to the _Format attribute.

When validation fails, an error message is shown. The error message can be specified by the _Message attribute.

Examples:
Answer: <input type="text" name="_Custom.Data2" _Required _Message="Answer is required.">
Order ID: <input type="text" _Format="ST\d{6,9}" _Message="Please enter a valid Order ID.">

 Expressions
Data Types
  • String (delimited by single quotes, thus cannot contain single quotes)
  • Number (can include decimal point)
  • Boolean:
    • TRUE (or T, YES, Y, or 1)
    • FALSE (or F, NO, N, or 0)
Operators

Order of evaluation (left-to-right evaluation if equal precedence)

  • Parentheses ((), innermost nested first)
  • String concatenation (+)
  • Numerical operators (in precedence order):
    • Negation (unary -)
    • Multiplication (*)
    • Division (/)
    • Addition (+)
    • Subtraction (binary -)
  • Relational operators (of equal precedence):
    • Equal (==, or =)
    • Less than (<)
    • More than (>)
    • Not equal (<>, or !=)
    • Not less than (>=)
    • Not more than (<=)
    • Case-insensitive string equality (~=)
  • Inclusion (IN, only defined for strings, form: x IN [], x IN [y], x IN [y1, y2], x IN [y1, y2, y3], etc.)
  • Boolean operators (in precedence order):
    • Negation (NOT, or !)
    • Intersection (AND, &&, or &)
    • Union (OR, ||, or |)