Currency setting for store

Hi.I hope somebody can help…
I looking opening my online store,but at the settings the currency I can’t hide trailing zeros in fractional part.I’m Hungarian,and my country all online store without trailing zeros and fractional part by currency format.
Like the currency format : 2500 Ft,or 9800 Ft etc…
I read somewhere,maybe by development settings can code modify,but I do not know how.
Can somebody you help me by wix store how can I set this?

Thanks,
Ildiko

Hi Ildiko!

This forum deals only with coding issues and WixCode related posts.
I would recommend contacting the Wix support team , as they know best.

Doron.

Wix support send me here with my question. :frowning:

Hi,
This feature isn’t available now.
Feel free to submit a feature request in our Feature Request forum .

Hi Ildiko, I posted something similar on another thread that might help you, yet in your case we must change a couple things in order to work with currencies, and here it is:

$w.onReady(function () { 
const locale = ("hu-HU", { style: 'currency', currency: 'HUF' }); 

$w("#dynamicDataset").onReady(() => { 

let itemObj = $w("#dynamicDataset").getCurrentItem(); 

$w("#textElement").text = itemObj.fieldKey.toLocaleString(locale); 
$w("#input1").value = itemObj.fieldKey.toLocaleString(locale);
} 
}); 
});

This code assumes you retrieve your data from your collection/database with .getCurrentItem. If you are connecting the data to the text or input element through the editor panel then you should probably change the code.

In the code above, replace the dataset name, text element or input element (depending on which one you are using) and instead of ‘fieldKey’ use the fieldKey name in your dataset that holds the number or price.

By the way, the locales for your country should be supported on every (or most devices as far as I found) but check it on your published site just to be sure. Oh and also, I haven’t tested the code with the currency options but it should work, if not then let me know.

I hope this helps you, or at least points you on the right direction :slight_smile: