Variable Reference

From Buyitsellit Wiki

Jump to: navigation, search

Contents

[edit] Global Variables

Global variables can be used within every page in your custom templates. They are not limited to any specific page

[edit] $Store Variables

Store variables are a collection of values that are specific to your store and are mostly defined in your store manager.

[edit] $Store.StoreTitle

The store title defined in the Preferences / General section. Example: Joe's CD Shack

Example Usage

<h1>Welcome to $Store.StoreTitle!</h1>

[edit] $Store.HomePageText

The Home Page text defined under appearance / page text.

Example Usage

<div>WwInnovation</div>

[edit] $Store.AboutUsText

The About Us text defined under appearance / page text.

Example Usage

<div>$Store.AboutUsText</div>

[edit] $Store.ContactUsText

The Contact Us text defined under appearance / page text.

Example Usage

<div>$Store.ContactUsText</div>

[edit] $Store.TermsText

The Terms text defined under appearance / page text.

Example Usage

<div>$Store.TermsText</div>

[edit] $Store.TitleTagText

The Page Title text defined under appearance / page text.

Example Usage

<title>$Store.TitleTagText</title>

[edit] $Store.MetaDescriptionText

The Meta Description text defined under appearance / page text.

Example Usage

<meta name="Description" content="$Store.MetaDescriptionText">

[edit] $Store.MetaKeyWordsText

The Meta Keywords text defined under appearance / page text.

Example Usage

<meta name="Keywords" content="$Store.MetaKeyWordsText">

[edit] $Store.MetaCustomName

The Custom Meta Name text defined under appearance / page text.

Example Usage

<meta name="$Store.MetaCustomName" content="$Store.MetaCustomValue">

[edit] $Store.MetaCustomValue

The Meta Custom Value text defined under appearance / page text.

Example Usage

<meta name="$Store.MetaCustomName" content="$Store.MetaCustomValue">

[edit] $Store.eBayUsername

Your eBay username defined under Preferences / General Settings.

Example Usage

<a href="http://myworld.ebay.com/$Store.eBayUserName/">View My Items on eBay!

[edit] $Store.GoogleMerchantID

Your Google Merchant ID Specified under Preferences / Payment Options / Google Checkout

Example Usage

<a href="#"><img src="https://checkout.google.com/buttons/checkout.gif?merchant_id=
$Store.GoogleCheckoutMerchantId&w=180&h=46&style=$Store.GoogleButtonStyle&variant=text&loc=en_US" 
alt="Google Checkout" OnClick="postCartToGoogle();" /></a>

[edit] $Store.GoogleButtonStyle

The Google Checkout Button Style Specified under Preferences / Payment Options / Google Checkout

Example Usage

<a href="#"><img src="https://checkout.google.com/buttons/checkout.gif?merchant_id=
$Store.GoogleCheckoutMerchantId&w=180&h=46&style=$Store.GoogleButtonStyle&variant=text&loc=en_US" 
alt="Google Checkout" OnClick="postCartToGoogle();" /></a>

[edit] $Store.GoogleUA

Your Google Analytics Account # Specified under Preferences / General Settings

Example Usage

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "$Store.GoogleUA";
urchinTracker();
</script>

[edit] $Store.LogoURL

The URL to your product logo uploaded from Apearance/Logo & Banner

Example Usage:

<img src="$Store.LogoURL" alt"My Logo">

[edit] $Store.AboutUsLink

The link to the About Us Page

Example Usage:

<a href="$Store.AboutUsLink">About Us</a>

[edit] $Store.ContactUsLink

The link to the Contact Us Page

Example Usage:

<a href="$Store.ContactUsLink">Contact Us</a>

[edit] $Store.TermsLink

The link to the Terms Page

Example Usage:

<a href="$Store.TermsLink">Our Terms</a>

[edit] $CartCount

The amount of items in a shoppers cart.

Example Usage:

You have $CartCount item(s) in your cart.

[edit] $CartTotal

The total dollar amount value in a shoppers cart.

Example Usage:

You have $CartCount item(s) in your cart. ($$CartTotal Total)

[edit] $Categories Collection

The categories collection allows you to loop through all of the categories or subcategories available. The default category ID is 0 which indicates there is no category. Using the $Category.CategoryLink will ensure you are linking to the correct product details list with the appropriate category ID.

Example Category Loop Usage:

<ul>
  #foreach($Category in $Categories) 
     <li><a href="$Category.CategoryLink">$Category.Name</a> ($Category.ProductCount)</li>
  #end
</ul>

[edit] $Category.Name

The Category Name

Example Category Loop Usage:

<ul>
  #foreach($Category in $Categories) 
     <li><a href="$Category.CategoryLink">$Category.Name</a> ($Category.ProductCount)</li>
  #end
</ul>

[edit] $Category.ProductCount

The number of products in this category

Example Category Loop Usage:

<ul>
  #foreach($Category in $Categories) 
     <li><a href="$Category.CategoryLink">$Category.Name</a> ($Category.ProductCount)</li>
  #end
</ul>

[edit] $Category.SubCategoryCount

The number of subcategories in this category

Example Category Loop Usage:

<ul>
  #foreach($Category in $Categories) 
     <li><a href="$Category.CategoryLink">$Category.Name</a> ($Category.SubCategoryCount)</li>
  #end
</ul>

[edit] $Category.CategoryLink

The link to the product details list for this category

Example Category Loop Usage:

<ul>
  #foreach($Category in $Categories) 
     <li><a href="$Category.CategoryLink">$Category.Name</a> ($Category.ProductCount)</li>
  #end
</ul>

[edit] $FeaturedProducts Collection

The FeatureProducts Collection selects 3 random products from your product library to be used anywhere on your store templates.

Example Usage:

<table id="products" cellpadding="10" cellspacing="15" width="100%">
<tr>
#foreach ( $FeaturedProduct in $FeaturedProducts)
<td>
  <a href="$FeaturedProduct.ProductLink">
   <img src="$FeaturedProduct.ProductImage110px" alt="$FeaturedProduct.Title" width="110" />
  </a>
<h3><a href="$FeaturedProduct.ProductLink">$FeaturedProduct.Title</a></h3>
<p>
 $$FeaturedProduct.Price 
 <a href="$FeaturedProduct.ProductLink" class="button">More Info</a>
</p>
</td>
#end
</tr>
<table>

[edit] $FeaturedProduct.Title

The title of the Featured Product

Example usage

<table id="products" cellpadding="10" cellspacing="15" width="100%">
<tr>
#foreach ( $FeaturedProduct in $FeaturedProducts)
<td>
  <a href="$FeaturedProduct.ProductLink">
   <img src="$FeaturedProduct.ProductImage110px" alt="$FeaturedProduct.Title" width="110" />
  </a>
<h3><a href="$FeaturedProduct.ProductLink">$FeaturedProduct.Title</a></h3>
<p>
 $$FeaturedProduct.Price 
 <a href="$FeaturedProduct.ProductLink" class="button">More Info</a>
</p>
</td>
#end
</tr>
<table>

[edit] $FeaturedProduct.Price

The price of the Featured Product

Example usage

<table id="products" cellpadding="10" cellspacing="15" width="100%">
<tr>
#foreach ( $FeaturedProduct in $FeaturedProducts)
<td>
  <a href="$FeaturedProduct.ProductLink">
   <img src="$FeaturedProduct.ProductImage110px" alt="$FeaturedProduct.Title" width="110" />
  </a>
<h3><a href="$FeaturedProduct.ProductLink">$FeaturedProduct.Title</a></h3>
<p>
 $$FeaturedProduct.Price 
 <a href="$FeaturedProduct.ProductLink" class="button">More Info</a>
</p>
</td>
#end
</tr>
<table>

[edit] $FeaturedProduct.ProductLink

The Product Link of the Featured Product

Example usage

<table id="products" cellpadding="10" cellspacing="15" width="100%">
<tr>
#foreach ( $FeaturedProduct in $FeaturedProducts)
<td>
  <a href="$FeaturedProduct.ProductLink">
   <img src="$FeaturedProduct.ProductImage110px" alt="$FeaturedProduct.Title" width="110" />
  </a>
<h3><a href="$FeaturedProduct.ProductLink">$FeaturedProduct.Title</a></h3>
<p>
 $$FeaturedProduct.Price 
 <a href="$FeaturedProduct.ProductLink" class="button">More Info</a>
</p>
</td>
#end
</tr>
<table>

[edit] $FeaturedProduct.ProductImageFull

The Full Size Image of the featured product

Example Usage

 <a href="$FeaturedProduct.ProductImageFull" target="_blank">
   View Full Size Image
 </a>

[edit] $FeaturedProduct.ProductImage80px

The 80x80px thumbnail of the Product Image

Example Usage

<img src="$FeaturedProduct.ProductImage80px" width="80" alt="">

[edit] $FeaturedProduct.ProductImage110px

The 110x110px thumbnail of the Product Image

Example Usage

<img src="$FeaturedProduct.ProductImage110px" width="110" alt="">

[edit] $FeaturedProduct.ProductImage132px

The 132x132px thumbnail of the Product Image

Example Usage

<img src="$FeaturedProduct.ProductImage132px" width="132" alt="">

[edit] $FeaturedProduct.ProductImage230px

The 230x230px thumbnail of the Product Image

Example Usage

<img src="$FeaturedProduct.ProductImage230px" width="230" alt="">

[edit] $Cart Collection

The collection is a global list of all items in a visitors cart. This can be access from any page or specifically the cart page

Example Usage

#foreach($CartItem in $Cart)
  #* cart content code & HTML here *#
#end

[edit] $Cart.Title

The title of the item in the cart.

Example usage

<h3><a href="$CartItem.ProductLink">$CartItem.Title</a></h3>

[edit] $Cart.Price

The price of the item in the cart.

Example usage

<p class="price">$$CartItem.Price each, $$CartItem.TotalPrice total</p>

[edit] $Cart.ID

[edit] $Cart.Price

The ID of the item in the cart. This is used for many cart functions including updates and deletes.

Example usage

<a href="#" OnClick="deleteCartItem($CartItem.ID);">Delete</a>

[edit] $Cart.Quantity

The Quantity of the item in the cart.

Example usage

Quantity <input type="text" name="quantity_$CartItem.ID" size="4" value="$CartItem.Quantity" />

[edit] $Cart.ProductLink

The link back to the product details for the cart item.

Example usage

<a href="$CartItem.ProductLink"><img src="$CartItem.ImageURL110px" alt="$CartItem.ItemTitle" /></a>

[edit] $Cart.ImageURLFull

The full size image URL of the default image.

Example usage

<a href="$CartItem.ImageURLFull"><img src="$CartItem.ImageURL110px" alt="$CartItem.ItemTitle" /></a>

[edit] $Cart.ImageURL80px

The 80x80 thumbnail of the product image.

Example usage

<a href="$CartItem.ProductLink"><img src="$CartItem.ImageURL80px" alt="$CartItem.ItemTitle" /></a>

[edit] $Cart.ImageURL110px

The 110x110 thumbnail of the product image.

Example usage

<a href="$CartItem.ProductLink"><img src="$CartItem.ImageURL110px" alt="$CartItem.ItemTitle" /></a>

[edit] $Cart.ImageURL132px

The 132x132 thumbnail of the product image.

Example usage

<a href="$CartItem.ProductLink"><img src="$CartItem.ImageURL132px" alt="$CartItem.ItemTitle" /></a>

[edit] $Cart.ImageURL290px

The 290x290 thumbnail of the product image.

Example usage

<a href="$CartItem.ProductLink"><img src="$CartItem.ImageURL290px" alt="$CartItem.ItemTitle" /></a>

[edit] $CheckOutLink

The link to the secure BISI secure checkout page.

Example usage

<a href="$CheckOutLink" class="button">Checkout</a> 

[edit] Page Specific Variables

[edit] Product Results List

[edit] $Products Collection

The $Products Collection is a list of items that are available for the current category ID. This is also used in product search results.

Example Usage

#foreach($Product in $Products)
  #* product list content code & HTML here *#
#end
[edit] $Product.Title

The title of the product in the list.

Example usage

<h3><a href="$Product.ProductLink">$Product.Title</a></h3>
[edit] $Product.Price

The price of the product in the list. This is based on the first product variation.

Example usage

<p>$$Product.Price <a href="$Product.ProductLink" class="button">More Info</a></p>
[edit] $Product.ProductLink

The link to the product details page.

Example usage

<a href="$Product.ProductLink"><img src="$Product.ProductImage110px" alt="$Product.Title" width="110" /></a>
[edit] $Product.ShortDescription

The shortented description (255 characters) of the item. All HTML is stripped from this variable.

Example usage

<span class="desc">$Product.ShortDescription</span>
[edit] $Product.ProductImageFull

The full size image URL of the default image.

Example usage

<img src="$Product.ProductImageFull" alt="$Product.Title" />
[edit] $Product.ProductImage80px

The 80x80 thumbnail of the product image.

Example usage

<a href="$CartItem.ProductLink"><img src="$Product.ProductImage80px" alt="$Product.Title" /></a>
[edit] $Product.ProductImage110px

The 110x110 thumbnail of the product image.

Example usage

<a href="$Product.ProductLink"><img src="$Product.ProductImage110px" alt="$Product.Title" /></a>
[edit] $Product.ProductImage132px

The 132x132 thumbnail of the product image.

Example usage

<a href="$Product.ProductLink"><img src="$Product.ProductImage132px" alt="$Product.Title" /></a>
[edit] $Product.ProductImage290px

The 290x290 thumbnail of the product image.

Example usage

<a href="$Product.ProductLink"><img src="$Product.ProductImage290px" alt="$Product.Title" /></a>

[edit] $CurrentCategoryName

The name of the current category being displayed

Example Usage

<h3>Currently Viewing $CurrentCategoryName.</h3>

[edit] Product Details

The product details page shows the spefics about the item being viewed.

[edit] $ProductTitle

The title of the product being viewed.

Example usage

<h2>$ProductTitle</h2>

[edit] $DefaultPrice

The default price of the product. This is determined by the default (first) variant in the product.

Example usage

<p class="price">$$DefaultPrice</p>

[edit] $DefaultVariantID

The default variant product. This is determined by the default (first) variant in the product. This is used for add to cart functions.

Example usage

<input type="hidden" name="DefaultVariantID" value="$DefaultVariantID"> 

[edit] $ProductDescription

The description of the product being viewed.

Example usage

<p>$ProductDescription </p>

[edit] $ShortProductDescription

This is a shortened version of your product description stripped of HTML and the first 250 characters. This is useful for filling a meta description tag.

Example usage

<meta name="description" content="$ShortProductDescription">

[edit] $DefaultImageURLFull

The full size image URL of the default image associated with the product.

Example usage

<img src="$DefaultImageURLFull" alt="$ProductTitle" />

[edit] $DefaultImageURL80px

The 80x80px thumbnail image URL of the default image associated with the product.

Example usage

<img src="$DefaultImageURL80px " alt="$ProductTitle" />

[edit] $DefaultImageURL110px

The 110x110px thumbnail image URL of the default image associated with the product.

Example usage

<img src="$DefaultImageURL110px " alt="$ProductTitle" />

[edit] $DefaultImageURL132px

The 132x132 px thumbnail image URL of the default image associated with the product.

Example usage

<img src="$DefaultImageURL132px " alt="$ProductTitle" />

[edit] $DefaultImageURL290px

The 290x290px px thumbnail image URL of the default image associated with the product.

Example usage

<img src="$DefaultImageURL290px " alt="$ProductTitle" />


[edit] $ProductImages Collection

The collection of images associated with the product being viewed.

Example Usage

#foreach($ProductImage in $ProductImages)
  #* product images content code & HTML here *#
#end
[edit] $ProductImage.URLFull

The full size Image URL of the image in the collection.

Example Usage

#foreach($ProductImage in $ProductImages)
  <img src="ProductImage.URLFull">
#end
[edit] $ProductImage.URL80px

The 80x80px thumbnail Image URL of the image in the collection.

Example Usage

#foreach($ProductImage in $ProductImages)
  <img src="ProductImage.URL80px ">
#end
[edit] $ProductImage.URL110px

The 110x110px thumbnail Image URL of the image in the collection.

Example Usage

#foreach($ProductImage in $ProductImages)
  <img src="ProductImage.URL110px ">
#end
[edit] $ProductImage.URL132px

The 132x132px thumbnail Image URL of the image in the collection.

Example Usage

#foreach($ProductImage in $ProductImages)
  <img src="ProductImage.URL132px ">
#end
[edit] $ProductImage.URL290px

The 290x290px thumbnail Image URL of the image in the collection.

Example Usage

#foreach($ProductImage in $ProductImages)
  <img src="ProductImage.URL290px ">
#end

[edit] $VariantCount

The number of variants associated with the product being viewed.

Example Usage

#if ($VariantCount == 1)
    #* do something *#
#end

[edit] $Variants Collection

The collection of variants associated with the product being viewed.

Example Usage

#foreach($Variant in $Variants)
      <option value="$Variant.ID">$Variant.Name for $$Variant.Price</option>
#end
[edit] $Variant.ID

The ID of the variant in the variant collection.

Example Usage

#foreach($Variant in $Variants)
      <option value="$Variant.ID">$Variant.Name for $$Variant.Price</option>
#end
[edit] $Variant.Name

The Name of the variant in the variant collection.

Example Usage

#foreach($Variant in $Variants)
      <option value="$Variant.ID">$Variant.Name for $$Variant.Price</option>
#end
[edit] $Variant.Price

The Price of the variant in the variant collection.

Example Usage

#foreach($Variant in $Variants)
      <option value="$Variant.ID">$Variant.Name for $$Variant.Price</option>
#end
[edit] $Variant.StockLevel

The Stock Level available of the variant in the variant collection.

Example Usage

#foreach($Variant in $Variants)
      <option value="$Variant.ID">$Variant.Name for $$Variant.Price ($Variant.StockLevel available)</option>
#end

[edit] Custom Pages

You can define up to 20 custom pages to use in your BISI store. Custom pages can be added from the Appearance / Custom pages section of your store manager.

The variables defined below are automatially generated when viewing your custom page at http://yourstoreurl/pages/custompagename

[edit] $Store.CustomPageTitle

The page title defined for your custom page.

Example Usage

<title>$!Store.CustomPageTitle</title>

[edit] $Store.CustomPageText

The text defined for your custom page.

Example Usage

<p>$Store.HOME</p>
Personal tools