Tata Posted July 4, 2008 Share Posted July 4, 2008 I posted here a question on using comma as a decimal delimiter. Immediately I got the answer. I changed the settings in Localisation>Currencies (comma as dec. delimiter, dot as 1000 delimiter). That's the waz how the prices are shown for visitors. But still, when inserting prices in admin area, I must only use the dot as dec. delimiter or the prices are rounded and tax is not calculated at all. Why can't I change also this feature? I mean - insert prices of new products in our standard national form: 1.234.567,89 SKK or 1 234 567,89 SKK? Please, this help is pretty urgent. If there is a hint, please send it to info@cmsimple.sk. THXIA. Link to comment Share on other sites More sharing options...
firben Posted May 29, 2010 Share Posted May 29, 2010 i'm also interested in an aswer for this... any ideas? Link to comment Share on other sites More sharing options...
♥FWR Media Posted May 29, 2010 Share Posted May 29, 2010 Comma decimal separators may be correct for Swedish and Danish currency but they are not correct for calculation .. these values are manipulated by javascript calculations which require the decimal to be a point. To achieve what you want you would need to alter the javascript to convert the value in then convert the value out. I only took a quick look so no promises but try replacing the following two javascript functions in admin/categories.php ( about line 464 ). function updateGross() { var taxRate = getTaxRate(); var grossValue = document.forms["new_product"].products_price.value; grossValue = grossValue.replace(',', '.'); if (taxRate > 0) { grossValue = grossValue * ((taxRate / 100) + 1); } grossValue = doRound(grossValue, 4); document.forms["new_product"].products_price_gross.value = grossValue.toString().replace('.', ','); } function updateNet() { var taxRate = getTaxRate(); var netValue = document.forms["new_product"].products_price_gross.value; netValue = netValue.replace(',', '.'); if (taxRate > 0) { netValue = netValue / ((taxRate / 100) + 1); } netValue = doRound(netValue, 4); document.forms["new_product"].products_price.value = netValue.toString().replace('.', ','); } Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.