Displaying product price

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

Displaying product price on the web site

 

The price is stored in the COM_SKU.SKUPrice field. The following method allows you to display the price in your transformation in the currently selected currency, with appropriate discount level and in the appropriate format specified at CMS Desk -> Tools -> E-commerce -> Configuration -> Currencies -> <edit currency> ->Currency formatting string:

 

<%# EcommerceFunctions.GetFormatedPrice(Eval("SKUPrice"), Eval("SKUDepartmentID")) %>

 

If you want to display prices with applied discount level and taxes as well, use the following function instead.

 

<%# EcommerceFunctions.GetFormatedPrice(Eval("SKUPrice"), Eval("SKUDepartmentID"),

Eval("SKUID")) %>

 

Please note: computation of all product taxes is time-consuming. Therefore, the result is stored in the cache as specified at CMS Site Manager -> Settings -> Web Site -> Cache content (minutes).  

 

If you don't want to display prices with the applied discount level and taxes, use the following function instead.

 

<%# EcommerceFunctions.GetFormatedPrice(Eval("SKUPrice")) %>

 

All product prices are displayed in currency chosen according to the following priorities:

 

1. the currency of the shopping cart

2. the preferred currency of a customer

3. the default currency

 

Therefore, if the currency of the shopping cart is not set yet (the shopping cart hasn't been created so far), all product prices are displayed in the preferred currency of the given customer. If the customer doesn't specify the preferred currency, all product prices are displayed in the default currency.

 

Page url: http://devnet.kentico.com/docs/ecommerceguide/index.html?displaying_product_price.htm