Havouza Posted January 28, 2020 Posted January 28, 2020 Is there a possible setting to make all prices 00 in the end, like 123.00 instead of 123.45
led24ee Posted January 28, 2020 Posted January 28, 2020 Yes, it is. Preferences -> Round mode, Preferences -> Number of decimals.
Traumflug Posted January 28, 2020 Posted January 28, 2020 Well, "Number of decimals" rounds to the given decimals, but also doesn't display additional ones. For example, rounding to full Euros works, but also displays it as € 123 rather than € 123.00. I'm pretty sure one could add some CSS to always add .00 to prices.
led24ee Posted January 28, 2020 Posted January 28, 2020 Well. In my shop this "Number of decimals" does exatly what asked. When I put this on 2 there is two places after dot. When I place this on 1 there is still two places after dot, but it is rounded. So there is 123.50 instead of 123.45 And if there is 0 then it is 123.00 instead of 123.45 (TB1.1-Bleeding ...., Niara)
Occam Posted January 29, 2020 Posted January 29, 2020 14 hours ago, Traumflug said: Well, "Number of decimals" rounds to the given decimals, but also doesn't display additional ones. This is not what a shop system should do. However, I guess you can use a Smarty statement In the product.tpl to format the price: {$price|string_format:"%.2f"} Or use number_format {$price|number_format:2} will output 10,00 (EU standards) {$price|number_format:2:",":"."} will output 10.00 (US standards)
Traumflug Posted January 29, 2020 Posted January 29, 2020 21 hours ago, led24ee said: When I place this on 1 there is still two places after dot, but it is rounded. That's not intended, there are currencies which actually want no digits after the decimal. Still glad to see this "misbehavior" matches what you want. 1
oliver Posted June 16, 2020 Posted June 16, 2020 Hmm, I'm actually a bit confused on this... I'm just now switching over from PrestaShop. In my old shop, I've gone to Preferences -> Number of decimals and set it to 0, which made it so that $123 was shown, rather than $123.00 With Thirtybees, it does however show as $123.00 (which I don't like) I see my template uses {convertPrice price=$productPrice|intval} which is the same that the default TB template uses. Now sure, I could use smarty and do my own rounding and removing of decimals... But $productPrice doesn't contain the currency symbol! I see there's some improvements are in the works: https://github.com/thirtybees/thirtybees/issues/865 But in the meantime, I'm left unsure on what to do... How can I get rid of the decimals, if not by going to Preferences -> Number of decimals and setting it to 0 ? Hardcoding this into my template seems like a bad solution. What exactly is this setting supposed to do anyways?
led24ee Posted June 16, 2020 Posted June 16, 2020 What version of TB is in use ? In my shop this works exactly what You expect.
oliver Posted June 16, 2020 Posted June 16, 2020 On 1/28/2020 at 4:45 AM, led24ee said: Well. In my shop this "Number of decimals" does exatly what asked. When I put this on 2 there is two places after dot. When I place this on 1 there is still two places after dot, but it is rounded. So there is 123.50 instead of 123.45 And if there is 0 then it is 123.00 instead of 123.45 (TB1.1-Bleeding ...., Niara) Well, what you describe is not what I personally expect, lol Unless the behavior has changed since you wrote this. I'm using TB 1.1.0
led24ee Posted June 16, 2020 Posted June 16, 2020 Looks like it is changed. I just checked and now it removes decimals. There is also possibility to make changes for every currency. Try this too. Maybe this will help.
oliver Posted June 16, 2020 Posted June 16, 2020 How peculiar... what currency have you tested it with?
toplakd Posted June 17, 2020 Posted June 17, 2020 11 hours ago, oliver said: I'm using TB 1.1.0 1.1.x Bleeding edge is the way to go, as its way more updated.
Traumflug Posted June 17, 2020 Posted June 17, 2020 There are (at least) two ways to format prices. One is the way you used. The other way can be found in back office ->Localization -> Currencies -> (edit currency). There one can turn off 'auto format' to get additional options. And even the ability to show one currency with decimals and another one without. 1
oliver Posted June 17, 2020 Posted June 17, 2020 2 hours ago, Traumflug said: There are (at least) two ways to format prices. One is the way you used. The other way can be found in back office ->Localization -> Currencies -> (edit currency). There one can turn off 'auto format' to get additional options. And even the ability to show one currency with decimals and another one without. Woohoo! This worked, thank you! 🙂 I'm gonna have to do some research on how to get TB 1.1.x Bleeding edge ... Do you pull that directly from the repo?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now