Template Replacement Tokens

General Tokens

[Order:OrderID]
[Order:UserID]
[Order:PortalID]
[Order:OrderNumber]
[Order:ShortOrderNumber]
[Order:OrderDate]
[Order:ShipDate]
[Order:ShippingAddressID]
[Order:BillingAddressID]
[Order:AppliedTax]
[Order:ShippingCost]
[Order:OrderIsPlaced]
[Order:OrderStatusID]
[Order:PayType]
[Order:CalculatedTax]
[Order:NoteMsg]
[Order:VATNumber]
[Order:Discount]
[Order:PromoCode]
[Order:Total]
[Order:BankAuthCode]
[Order:TrackingLink]
[Order:DetailRows]
[Order:ShippingMethod]
[Order:TrackingLink]
[Order:CartTotal]

[SAddress:AddressID]
[SAddress:PortalID]
[SAddress:UserID]
[SAddress:AddressDescription]
[SAddress:AddressName]
[SAddress:Address1]
[SAddress:Address2]
[SAddress:City]
[SAddress:RegionCode]
[SAddress:CountryCode]
[SAddress:Country]
[SAddress:PostalCode]
[SAddress:Phone1]
[SAddress:Phone2]
[SAddress:PrimaryAddress]
[SAddress:CreatedByUser]
[SAddress:CreatedDate]
[SAddress:OrderID]
 [BAddress:AddressID]
[BAddress:PortalID]
[BAddress:UserID]
[BAddress:AddressDescription]
[BAddress:AddressName]
[BAddress:Address1]
[BAddress:Address2]
[BAddress:City]
[BAddress:RegionCode]
[BAddress:CountryCode]
[BAddress:Country]
[BAddress:PostalCode]
[BAddress:Phone1]
[BAddress:Phone2]
[BAddress:PrimaryAddress]
[BAddress:CreatedByUser]
[BAddress:CreatedDate]
[BAddress:OrderID]

[Cart:TaxAmt]
[Cart:TaxAppliedAmt]
[Cart:ShipAmt]
[Cart:DiscountAmt]
[Cart:TotalAmt]
[Cart:OrderTotal]
[Cart:Qty]

[OrderUser:Email]
[OrderUser:username]
[OrderUser:FirstName]
[OrderUser:LastName]
[OrderUser:DisplayName]

[Model:ModelID]
[Model:ProductID]
[Model:ListOrder]
[Model:UnitCost]
[Model:Barcode]
[Model:ModelRef]
[Model:Lang]
[Model:ModelName]
[Model:QtyRemaining]
[Model:QtyTrans]
[Model:QtyTransDate]
[Model:ProductName]
[Model:PortalID]
[Model:Weight]
[Model:Height]
[Model:Length]
[Model:Width]
[Model:Deleted]
[Model:QtyStockSet]
[Model:DealerCost]
[Model:PurchaseCost]
[Model:XMLData]
[Model:Extra]

[Currency:Symbol]
[WishList:ItemCount]
 

lightbox.template Tokens

[Product:ImageThumb]
[Product:ImageURL]
[Product:ImageDesc]

Productlist.template and Productdetail.template Tokens

[TAG:PRODUCTNAME]
[TAG:PRODUCTREF]
[TAG:SUMMARY]
[TAG:SUMMARYHTML] - Displays summary with the vbCrLf converted to "<br />"
[TAG:DESCRIPTION]
[TAG:IMAGE]
[TAG:MANUFACTURER]
<a href="[TAG:LINK]">Link</a> - create a hyperlink to the product detail page.
<a href="[TAG:LINKSIMPLE]">Link</a> - create a hyperlink to the product detail page without extra parameters.
[TAG:FROMPRICE] - Cheapest price of models attched to the product.
[TAG:FROMPRICECURRENCY] - Cheapest price of models attched to the product formatted as a currency.
[TAG:CURRENCYSYMBOL]
[TAG:QTYREMAINING]
[TAG:SALEPRICE] - If there is no sale price then this token displays nothing, it can also be use with the "saleprice.template" tempate. Currency Formmating is NOT applied
[TAG:SALEPRICECURRENCY] - If there is no sale price then this token displays nothing, it can also be use with the "saleprice.template" tempate. Currency Formmating is applied
[TAG:BESTPRICE] - If there is no sale price then this token displays the "fromprice.template" template else it displays the "saleprice.template" template. If no template exist then the Best price is displayed.
[TAG:BESTPRICECURRENCY] - If there is no sale price then this token displays the "fromprice.template" template else it displays the "saleprice.template" template. If no template exist then the Best price is displayed in currency format.
[TAG:DEALERPRICE] - If the user is a member of the dealer roles, as specified in the "dealer.role" setting then this token displays the dealer price or "dealerprice.template" template if it exists. If no dealer price exists then the model price is displayed. [TAG:DEALERPRICECURRENCY] - If the user is a member of the dealer roles, as specified in the "dealer.role" setting then this token displays the dealer price or "dealerprice.template" template if it exists. If no dealer price exists then the model price is displayed in currency format. [TAG:EDITLINK] - Edit button appears if user has rights to edit the product list module.
[TAG:ADDTOBASKET] - Buy button
[TAG:MODELS:{properties xml}] - Combo list of models if more than one exists, if not nothing will be displayed.
[TAG:MODELSRADIO:{properties xml}] - Rabdio Button list of models if more than one exists, if not nothing will be displayed.
[TAG:OPTIONNAME1]
[TAG:OPTION1:{properties xml}]
additional [TAG:OPTION<Number>:{properties xml}] can be added as you wish. The number will match the sort order of options
[TAG:OPTIONRADIO1:{properties xml}]
additional [TAG:OPTIONRADIO<Number>:{properties xml}] can be added as you wish. The number will match the sort order of options
[TAG:OPTIONTEXT1:{properties xml}]
additional [TAG:OPTIONTEXT<Number>:{properties xml}] can be added as you wish. The number will match the sort order of options
[TAG:OPTIONVALRANGE:{properties xml}] - Range validator for options
[TAG:OPTIONVALREGX:{properties xml}] - Regular Expression validator for options
[TAG:OPTIONVALREQ:{properties xml}] - validator for options
[TAG:OPTIONVALSUMMARY:{properties xml}] - validator for options
[TAG:QTY:{properties xml}] - Product Quantity textbox.
[TAG:IMAGELIGHTBOX] - this tag will be replaced with the "lightbox.template" template.
[TAG:GALLERY1] - this tag will be replaced with the "lightboxgallery.template" template.
additional [TAG:GALLERY<Number>] can be added as you wish.
[TAG:GALLERYURL1] - this tag will be replaced with the image url.
additional [TAG:GALLERY<Number>] can be added as you wish.
[TAG:GALLERYTHUMBURL1] - this tag will be replaced with the image url.
additional [TAG:GALLERYTHUMBURL<Number>] can be added as you wish.
[TAG:GALLERYID1] - this tag will be replaced with the image id. Usually for use with the thumbnail resizer.
additional [TAG:GALLERY<Number>] can be added as you wish.
[TAG:DOC1:{properties xml}] - this tag will be replaced with the download document icon.
additional [TAG:DOC<Number>] can be added as you wish.
[TAG:DOCLINK1:{properties xml}] - this tag will be replaced with the download link.
additional [TAG:DOCLINK<Number>] can be added as you wish.
[TAG:DOCDESC1:{properties xml}] - this tag will be replaced with the download document description.
additional [TAG:DOCDESC<Number>] can be added as you wish.
[TAG:DOCPURCHASED1:{properties xml}] - this tag will be replaced with the download document icon.
additional [TAG:DOCPURCHASED<Number>] can be added as you wish.
[TAG:DOCPURCHASEDLINK1:{properties xml}] - this tag will be replaced with the download link.
additional [TAG:DOCPURCHASEDLINK<Number>] can be added as you wish.
[TAG:IMAGEURL]
[TAG:THUMBURL]
[TAG:THUMBSIZE]
[TAG:MODULEPATH]
[TAG:TRACKINGCODE]
[TAG:SOLDOUTIMG] - If the product stock qty = 0 this token will display the "soldoutimg.template" template.
[TAG:STOCKPERCENT] - Displays the percantage of stock left, based on the Max Stock amount. 
[TAG:MODELSTABLE] - Displays the models as a table, used with 'modeltable.template' 
[TAG:TABLEROWS] - token used only in 'modeltable.template' to call the 'modeltablerow.template' 
[TAG:XMLDATA:<xpath>] - xmlpath should always start with "genxml" and be in lowercase. (e.g. "[TAG:XMLDATA:genxml/textbox/txttitle]")
[TAGXML:xslfilename] - token used to run xsl in template, the "xslfilename" can be either a file on you portal root or the name of a template in the backoffice templates. (use debug.mode to get example of xml output into portal root.)
[TAG:ADDTOWISHLIST:{properties xml}] - token to display wishlist add button (e.g. [TAG:ADDTOWISHLIST:<prop text="Add to WishList" />])
[TAG:REMOVEFROMWISLIST:{properties xml}] - token to display wishlist remove button (e.g. [TAG:REMOVEFROMWISLIST:<prop text="Remove From WishList" />])
[TAG:CATIMAGEURL] - token will be replaced with the category image url. 
[TAG:ADDRELATED] - Token can be used in the adminproductitem.template and adminproductalt.template to add related items. [TAG:WEBSITEURL]

{properties xml} = A list of properties that can be linked to the control created. These porperties MUST be case sensitive and match to normal asp.Net properties.
E.g.
<prop CssClass="MyCssClass" RepeatColumns="2" RepeatDirection="1" />

Examples:
[TAG:QTY:<prop ErrorMessage="Invalid Quantity"/>]
[TAG:OPTIONRADIO1:<prop CssClass="MyCssClass" RepeatColumns="2" RepeatDirection="1" />]
[TAG:OPTIONTEXT3:<prop CssClass="MyCssClass" Width="50" MaxLength="3" ToolTip="Option3"/>][TAG:OPTIONVALREQ:<prop ErrorMessage="Invalid Option3 must be entered" Text="*" ControlToValidate="OPTIONTEXT3" />][TAG:OPTIONVALRANGE:<prop ErrorMessage="Invalid Option3 Text" Text="*" Type="Integer" MaximumValue="500" MinimumValue="0" ControlToValidate="OPTIONTEXT3" />]

NOTES:
- The ToolTip property of the textbox is used to display option in the cart
- When using the Textbox uncheck the "Increment Cart:" option in product list settings, otherwise text inputs may be lost when multiple items are added to the cart.
- To ensure formatting of case and {properties XML} is uneffected by editor re-formatting use the edit with Textbox option, in the template editing admin.
- For downloadable item use the [TAG:DOCPURCHASED1] and [TAG:DOCPURCHASEDLINK1] tokens. The links to download will only appear when the user has orders in the their order history on status "Payment OK" or "Closed", if the order is on any other stauts the link will not be displayed.

logintext.text Tokens

These tokens can be used to replace the javascript call to register,login and also to skip the login for stores that do not require a login to purchase.
[TAG:Register]
[TAG:Login]
[TAG:SkipLogin]

Special Template Tokens

[Template:<name of template>]
NB_Store will look for a template that exists by the name and insert it into the calling template. Recursive template calling is supported to a depth of 4 levels.

Report Tokens

[Report:<reportref>]  - These tokens can be used to display reports from the reporting system.

lblEstShipDate.Text Tokens

This token can be found in the Checkout.ascx.resx file
[TAG:ESTIMATEDDATE]
This resource file entry allows you to put a estimated date of shipping onto the checkout. 


Last edited Jul 12, 2010 at 7:24 AM by robax, version 4

Comments

PaulBolejack Apr 2, 2014 at 5:10 PM 
[Order:Email] - Not listed above, but as of 2.3.8 it is valid.

Based on my testing here is the difference between [Order:Email] and [OrderUser:Email]:
When a customer does not log in, the email address that they enter on the order (in the “address” step of checkout) is in [Order:Email] and, because there is no logged on user, [OrderUser:Email] is blank.
When a customer is logged in, the email address from the user account is in [OrderUser:Email]. That email address is then used as the default value for the email address field on the “address” checkout page - typically found in [Order:Email]. However, if they leave the email address alone (eg: [Order:Email] = [OrderUser:Email]) then [Order:Email] is blank. If the default email address that comes from the user account is modified on the order, then it will go in [Order:Email] and [OrderUser:Email] will still have the value from the user account. Also note that if the two email addresses are different, the confirmation email only goes out to [Order:Email] – the one entered into the order.

raphael_m Jan 27, 2014 at 7:15 AM 
I believe that [TAG:CATNAME] is missing on this list, just found it in a discussion: https://nbstore.codeplex.com/discussions/436189

rcsw Dec 17, 2011 at 10:28 AM 
In the general section the token "[Order:TrackingCode]" is missing. Instead the token "[Order:TrackingLink]" is specified twice.

PaulBolejack Jan 19, 2011 at 6:15 PM 
It may be worth noting that [TAG:Login] & [TAG:Register] require that the DNN Login & User skin objects are used in the site skin and that their IDs are dnnLOGIN and dnnUSER respectively.

I realize that the typical scenario has them in the skin but the site I'm working on currently does not. This site has a members only section with the Account Login module on the landing page for that section. The login skin object is not used in the skin so there are no handlers for 'dnn$dnnLOGIN$cmdLogin'. When testing to see if that was my problem I added <dnn:LOGIN ID="LOGIN" CssClass="hiddenlogin" runat="server" /> and realized that the ID must be dnnLOGIN (or that I manually write the postback call in the logintext.text setting). I imagine NB Store might be able to create it's own handler to redirect to the login page but I'm sure you guys have better things to do.
And when I use the terms "imagine" and "better things to do", I do so respectfully. You guys are providing a wonderful module and are fantastic about responding to questions.