Skip to main content

Display widget Tokens

Display Widget is one of the most outstanding features of Scaffolding, it allows to highlight product data such as Price, Price Offer, Price with discount, Savings and much more. In order to refer to this data in a Display Widget, we use the name of the data enclosed in square brackets that we call tokens.

The most commonly used tokens are the Price tokens, which refer to everything related to the price, savings and discount of a product, then there are the Attribute tokens, which refer to dimensions, stock and other product data and finally the Custom tokens, which have a variable name, for example, the name of a category, brand, a custom field of the product or even a reference to an image loaded in the Image manager of BigCommerce.

These three groups are described in the following sections.

Price tokens

Price tokens

Price tokens refer to product prices, discount percentages and corresponding savings amount. Within these there are three types, the Standard prices, BigCommerce's own values corresponding to MSRP, Prices or Sale price, those corresponding to Discount By Category prices, to show for example the price of the product after applying a 10% discount to the products of a category and finally the Best & Better prices for the product, which refer to the best values of the two previous types.

Price token types

(see note below to understand Product/Variant selected and Min and Max tokens)

Standard Prices
  • MSRP
    • Product/Variant selected:
      • {msrp}
    • Variant range:
      • {msrp_min}, {msrp_max}
  • Price (Default price)
    • Product/Variant selected:
      • Available if {price} is set as the retail price for all or some customers
        • {price}
        • {price_discount}, discount percentage from {msrp}
        • {price_save}, savings compared to {msrp_price}
      • Available if {price} is not set as the retail price
        • {price_before} = {price}
        • {price_was} = {price} but appears strikethrough
        • {price_discount_before} = {price_discount_msrp} = {price_discount_was} = {price_was} = {price_discount_msrp}
        • {price_discount_was} = {price_discount_msrp} but appears strikethrough
    • Variant range:
      • {price_min}, {price_max}
  • Sale Price
    • Product/Variant selected:
      • Available if {sale_price} is set as the retail price for all or some customers
        • {sale_price}
        • {sale_discount}, discount percentage from {price}
        • {sale_save}, savings compared to {price}
        • {sale_discount_msrp}, discount percentage from {msrp}
        • {sale_save_msrp}, savings compared to {msrp}, {sale_save_msrp}, savings compared to {msrp}
      • Available if {sale_price} is not set as the retail price
        • {sale_price_before} = {sale_price}
        • {sale_price_was} = {sale_price} but appears strikethrough
    • Variant range:
      • Available if {sale_price} is set as the retail price for all or some customers
        • {sale_min}, {sale_max}, {sale_was} = {sale_price}, {sale_max}
Discount By Categiory Prices
  • DBC #1
    • Product/Variant selected:
      • Available if {dbc1_price} is set as the retail price for all or some customers
        • {dbc1_price}
        • {dbc1_discount}, discount percentage from lower price of {sale_price} and {price}
        • {dbc1_save}, savings compared to lower price of {price} and {sale_price}
        • {dbc1_discount_msrp}, discount percentage from {msrp}
        • {dbc1_save_msrp}, savings compared to {msrp}
    • Variant range:
      • Available if {dbc1_price} is set as the retail price for all or some customers
        • {dbc1_min}, {dbc1_max}, {dbc1_max}, {dbc1_price}, {dbc1_max}
  • DBC #2
    • Product/Variant selected:
      • Available if {dbc2_price} is set as the retail price for all or some customer
        • {dbc2_price}
        • {dbc2_discount}, discount percentage from best price of {sale_price} and {price}
        • {dbc2_save}, savings compared to best price of {price} and {sale_price}
        • {dbc2_discount_msrp}, discount percentage from {msrp}
        • {dbc2_save_msrp}, savings compared to {msrp}
      • if Include items that apply Discount by Category #1 is off:
        • {dbc2_discount_dbc1}, discount percentage from {dbc1_price}
        • {dbc2_save_dbc1}, savings compared to {dbc1_price}
    • Variant range:
      • {dbc2_min}, {dbc2_max}
Best & Better Prices
  • Better
    • Product/variant selected:
      • {better_price}, the lower price, excluding DBC prices not applicable to all customers
      • {better_discount}, discount percentage from {price}
      • {better_save}, savings compared to {price}
      • {better_discount_msrp}, discount percentage from {msrp}
      • {better_save_msrp}, savings compared to {msrp}
    • Variant range:
      • {better_min}, {better_max}
  • Best
    • Product/Variant selected:
      • {best_price}, the lowest among {price}, {sale_price}, {dbc1_price}, and {dbc2_price}, regardless of whether DBC1 or DBC2 applies to all customers
      • {best_discount}, discount percentage from {price}
      • {best_save}, savings compared to {price}
      • {best_discount_msrp}, discount percentage from {msrp}
      • {best_save_msrp}, savings compared to {price}
    • Variant range:
      • {best_min}, {best_max}

Note:

Token availability

Tokens are not always available. For instance:

  • If the product has a variant, and the customer has not yet selected a variant, {price} is unavailable, but {price_min} and {price_max} are.
  • When the product is on sale, {price} is unavailable, but {sale_price} is.
  • In cases where the product is on sale, and there's a discount like DBC1 applicable to all customers, {sale_price} is not available, but {dbc1_price} is.
  • If the product is on sale, and there's a discount like DBC1 that doesn't apply to all customers, both {sale_price} and {dbc1_price} are available.

Whether a price serves as the selling price for some or all customers depends on whether the 'Apply to all customers' option of DBC1 or DBC2 is selected or not.

Product/Variant selected vs Variant range
Product/Variant selected refers to a scenario where a variant has been chosen or the product has no variants. On the other hand, Variant range indicates that the customer hasn't selected a product/variant, and the product offers variant options with different values.

Attribute tokens

Attribute Tokens

Attributes tokens refer to the following product data and its variants:

  • Products
    • brand: Brand name
    • weight: Weight
    • width: Width
    • depth: Depth
    • height: Height
    • stock: Inventory level
    • stock_warning: Inventory warning level
  • Variants
    • weight: Weight
    • width: Width
    • height: Height
    • depth: Depth
    • stock: Inventory level
    • stock_warning: Inventory warning level
Custom tokens

Custom tokens

Custom tokens are tokens that have a variable name, not like the other two groups, Price tokens and Attribute tokens, whose names are preset, but in this case, the name depends on the data that have been loaded to the product.

Basically the Custom tokens refer to data loaded into the catalog and are subdivided into the following groups:

Custom fields tokens

The token name is the name of the custom field and the value is the value of the custom field.

For example, if you had a custom field named ip that indicates the degree of dust and water resistance of a cell phone, you could highlight the degree of compliance with a display widget with the content "IP: {ip}", this would be displayed only on products that have the custom field ip assigned with a value.

 

Category & Brand tokens

These tokens are used to display a Display widget for a certain category or brand.

For example, if we wanted to highlight that we extend the warranty to all Apple products we could do it with a display widget containing "{apple}::2-Year Extended Warranty Plan". Display Widget will display "2-Year Extended Warranty Plan" only on products that have Apple as a brand name (See When to display a block and when not to?).

URL tokens

These tokens are used to show display widgets only to users who arrive at the site with a certain URL. Basically they are used in mailings, social network postings or advertising, where the user clicks on a link specially prepared to receive it with certain messages.

The token name has to appear in the URL preceded with the prefix dwt_.

For example, if you wanted to show a discount coupon to a lead base to which you will send a mailing, you would simply link to the site with a URL of the type www.mysite.com?dwt_vip_coupon=PRE-BLACK-FRIDAY.

By referencing the {vip_coupon} token in a display widget, for example, "10% off with {vip_coupon} coupon", users entering the site from that link would see "10% off with PRE-BLACK-FRIDAY coupon".

By combining URL tokens with Category & Brand tokens, you could have these leads only show the coupon on products in the Black friday category with the content "{black friday}::10% off with {vip_coupon} coupon".

Note: The URL Token information is stored for 60 days on the device with which you entered the site, you should verify that the Cookie Policy allows it.

 

Image tokens

These tokens allow you to reference an image that has been uploaded to the BigCommerce Image Manager. For example, {img_sale-badge.png} refers to the image sale-badge.png that should exist in the Image Manager to be displayed.
Note: if the file extension is not specified, png is assumed.

 

Variant option tokens

As the name implies, these tokens refer to the options of a variant, for example, {color} would refer to the Color option of a variant.

For example, you could highlight the chosen model code on the image as in this case using "Diseño: {model}:

 

ToDo: Illustrate the 4 examples"

ToDo: Define image size theme in Image tokens