Knowledgebase: Customizing
How can I allow currency sign ($, etc) in price fields ?
Posted by - NA - on 02 February 2006 01:21 PM
For price field storing we recommend numeric database field type (like the built-in 'v_price' field). It stores numbers only and ensures correct (numeric) prices sorting and price range searching features. Although price is stored as numbers only value, it can be displayed formatted, please search the knowledgebase for more details on price formatting topic.

If you'll decide to allow non-numeric chars in your price field (to allow currency sign or phrases like "Call", "Ask Price", etc) you can delete 'Price' field from your fieldset and add it back but with specifying v_255_xx as DB_Field which can store any chars but lacks numeric sorting and range searching features. Users will have to re-enter their price values in this case, so this is recommended to do only at the early stage of website configuration.

Anyway, to solve currency sign entering problem you can do the following :

- if you need one currency, you can just hard-code it into the necessary templates where price is displayed (next to the price field);

- if you need multiple currencies, add a new field "Currency" where user will specify currency and insert currency placeholder (e.g. ##f_currency##) into the necessary templates.

Comments (0)
Help Desk Software by Kayako Fusion