10.0.x
541 201 9965 Email Website
Contents
:
Search:

Home > Skinning > Tokens

Tokens

Tokens are text that you place throughout your site to add dynamic information to a page or block of content. Tokens can be used in layout files and topics as well as category, and product descriptions.

Usage

To add tokens to a layout or view file use this format:

@Html.Token("TOKENNAME")

 

Or for more complicated tokens

@Html.Token("TOKENNAME", new { key = "value", key2 = "value2"})

 

 

Everywhere else (Topics, Category Descriptions, Product Descriptions, etc.) you can add tokens like this:

(!TokenName!)

 

Or for more complicated tokens:

(!TokenName Key='Value' Key2='Value'!)

 

For live token examples on your own AspDotNetStorefront site visit http://{YOURDOMAIN}/topics/tokens.html . This topic page allows you to see all the available tokens and what they render out on your own site.

Available Tokens

ADDTOCARTFORM Creates an add-to-cart form for a product

(!AddToCartForm ProductId='1' VariantId='1'!)

APPCONFIG Get the value of an appconfig

(!AppConfig Name='storename'!)
(!CategoryLink CategoryId='1' SEName='category-one'!)

COPYRIGHTYEARS Get the copyright year or year range

(!CopyrightYears!)

COUNTRYSELECTLIST Used to output the country drop down

(!CountrySelectList!)

CURRENCYSELECTLIST Used to output the currency drop down

(!CurrencySelectList!)

CUSTOMERID The current user's CustomerId

(!CustomerId!)

CUSTOMERLOCALE Gets the current user's locale

(!CustomerLocale!)
(!EntityLink EntityId='1' SeName='category-one' EntityName='category'!)

FORMATCURRENCY Format a decimal in the current user's currency

(!FormatCurrency Value='10.00'!)

IMAGEURL Gets a URL for a product or entity image

(!ImageUrl Id='1' Type='product' Size='icon'!)

INVOCATION Shows the URL including the sub-folder application name (if you have one) and the query string

(!Invocation!)

LOCALESETTING Gets the current user's locale

(!LocaleSetting!)

LOOKUPIMAGE Renders an image of a product or entity

(!LookupImage Id='1' Type='product' Size='icon'!)
(!ManufacturerLink ManufacturerId='1' SEName='manufacturer-one'!)

MICROPAYBALANCE The current user's MicroPay balance

(!MicropayBalance!)

MICROPAYBALANCECURRENCY The current user's MicroPay balance converted to the user's currency

(!MicropayBalanceCurrency!)

MICROPAYBALANCERAW The current user's MicroPay balance without a label

(!MicropayBalanceRaw!)

NUMCARTITEMS The number of items in the current user's shopping cart

(!NumCartItems!)

NUMWISHITEMS The number of items in the current user's wishlist

(!NumWishItems!)
(!ObjectLink ObjectId='1' SeName='category-one' ObjectName='category'!)

PAGEINFO HTML commented page diagnostic info used on the default template

(!PageInfo!)
(!ProductLink ProductId='1' SEName='product-one'!)

PRODUCTPROPERNAME Get a product and variant concatenated name (Product Name-Variant Name)

(!ProductProperName ProductId='1' VariantId='1'!)
(!SectionLink SectionId='1' SEName='department-one'!)
(!SignInOutLink!)

SIGNINOUTTEXT "Login" or "Logout" depending on the whether the current user is logged in or not

(!SignInOutText!)

SKINID Get the current SkinId

(!SkinId!)

SKINNAME Get the current SkinName

(!SkinName!)

SKINPATH Get the current SkinPath

(!SkinPath!)

STORELOCALE Gets the default locale for the store

(!StoreLocale!)

STRINGRESOURCE Get a string resource

(!StringResource Name='ResponsiveSkin.AccountLabel'!)

TOPIC Get the contents of a topics

(!Topic name='HelpBox'!)
(!TopicLink Name='about'!)

URL Get a URL to a given action and controller with optional route values

(!Url ActionName='Index' ControllerName='Checkout' Query1='test' Query2='test'!)

USERMENUNAME Says the user's name if you're logged in otherwise it says "my account"

(!UserMenuName!)

USERNAME Says "Welcome, {User Name}" if you're logged in

(!UserName!)

VATSELECTLIST Used to output the inclusive/exclusive vat drop down

(!VatSelectList!)

XMLPACKAGE Display the output of an XmlPackage

(!XmlPackage Name='RelatedProducts' ProductId='1'!)

 

Deprecated Tokens

The following tokens are no longer available in 10.0.x

ADMIN_FOR

Displays the string "AspDotNetStorefront Admin For:"

Please use (!StringResource Name='admin.main.ascx.adminfor'!) instead.

CARTPROMPT

The shopping cart string resource

Please use (!StringResource Name='appconfig.cartprompt'!) instead.

CATEGORY_PROMPT

Display a header for the category menu

Please use (!StringResource Name='appconfig.categorypromptplural'!) instead.

CATEGORY_PROMPT_SINGULAR

Display a header for the category menu

Please use (!StringResource Name='appconfig.categorypromptsingular!) instead.

CATEGORY_PROMPT_PLURAL

Display a header for the category menu

Please use (!StringResource Name='appconfig.categorypromptplural'!) instead.

COUNTRYDIVDISPLAY

Used to show or hide the country dropdown div

COUNTRYDIVVISIBILITY

Used to show or hide the country dropdown div

CURRENCYDIVDISPLAY

Used to show or hide the currency drop down div

CURRENCYDIVVISIBILITY

Used to show or hide the currency drop down div

EMAILPRODUCTTOFRIEND

Render an email a product to a friend link

GETNEWSBOXEXPANDED

Shows the news box

Use the news xmlpackage token instead (!XmlPackage Name='news'!).

GETSPECIALSBOXEXPANDED

Shows the specials box

GETSPECIALSBOXEXPANDEDRANDOM

Shows a random special product from the given category

HDRID

Get a number between 1 and 7

HELPBOX

Shows the "helpbox" topic

Please use (!Topic Name='helpbox'!) instead.

HELPBOX_CONTENTS

Displays the help box topic

Please use (!Topic Name='helpbox'!) instead.

MANUFACTURER_PROMPT

Display a header for the manufacturer menu

Please use (!StringResource Name='appconfig.manufacturerpromptplural'!) instead.

MANUFACTURER_PROMPT_SINGULAR

Display a header for the manufacturer menu

Please use (!StringResource Name='appconfig.manufacturerpromptsingular'!) instead.

MANUFACTURER_PROMPT_PLURAL

Display a header for the manufacturer menu

Please use (!StringResource Name='appconfig.manufacturerpromptplural'!) instead.

NEWS_SUMMARY

Displays the news summary

Use the news xmlpackage token instead (!XmlPackage Name='news'!).

PAGEURL

Used to output the page URL

You can use the (!INVOCATION!) token if you need something similar.

PAGINGCONTROL

Return paging links

PRODUCTRATINGS

Display a product's ratings

RANDOM

Get a number between 1 and 7

RELATEDPRODUCTS

Display a product's related products

Use the related products xmlpackage token directly instead: (!XmlPackage Name='RelatedProducts' ProductId='1'!)

Displays the search box.

Use the partial view for search instead.

Displays the search box

SECTION_PROMPT

Display a header for the department menu

Please use (!StringResource Name='appconfig.sectionpromptplural'!) instead.

SECTION_PROMPT_SINGULAR

Display a header for the department menu

Please use (!StringResource Name='appconfig.sectionpromptsingular'!) instead.

SECTION_PROMPT_PLURAL

Display a header for the department menu

Please use (!StringResource Name='appconfig.sectionpromptplural'!) instead.

SITENAME

Displays the contents of the StoreName appconfig

Please use (!AppConfig Name='storename'!) instead.

SITE_NAME

Displays the contents of the StoreName appconfig

Please use (!AppConfig Name='storename'!) instead.

UPSELLPRODUCTS

Display a product's upsell products

You can use the xmlpackage token instead: (!XmlPackage Name='UpsellProducts' ProductId='1'!)

USER_MENU

Account and login/logout link

VATDIVDISPLAY

Used to show or hide the inclusive/exclusive vat drop down

VATDIVVISIBILITY

Used to show or hide the inclusive/exclusive vat drop down

VATREGISTRATIONID

Shows the current user's vat registration id

VBV

Shows the verified by Visa seal if you've got Cardinal Commerce enabled



Actions
Print This Article
Bookmark
Email This Article
Previous Article
Next Article

Was this page helpful?YesNo