On this site (http://demo.cmykreative.com/berkeley/index.php?option=com_virtuemart&view=category&virtuemart_category_id=9&limitstart=64) we have the base currency set in British Pounds, when changing the currency to another, it produces some messy conversions. What's a quick easy way to make it round up to the nearest whole number?
i.e.
NOW
£34.00
฿ 1,681.31
WE WANT
£34.00
฿ 1,681.00
OR
฿ 1,681.31 = ฿ 1,681.00
฿ 1,681.57 = ฿ 1,682.00
Hello,
forgot to mention your vm version. In version 2.0.12 which just released have been introduced round prices on price configuration. So you could upgrade and fix the rounded prices.
You can also search the forum to find solutions regarding price rounding. Such as:
https://forum.virtuemart.net/index.php?topic=98076.0
http://forum.virtuemart.net/index.php?topic=97878.msg322695#msg322695
Regards
We are running 2.0.10 but I'm loathe to upgrade yet again as it breaks the site every time it upgrades.
I tried those hacks, but they had absolutely no effect.
Any thoughts?
Hi,
I thinking the same, use rounding prices will help you to resolve it. Perhaps using them only for the one currency or from the backend edit the currency and remove the decimals (0) with the rounding at the same time ...
Can you try it?
Some more information for round: http://php.net/manual/en/function.round.php
Regards
OK, we've done this:
In Joomla! Administrator -> Conponents -> VirtueMart:
1/ Go to Configuaration -> Select Pricing tab -> Show Following Prices
- Select Enable shoppergroup specific price display
- Select Show Prices
- Select any price display as you want in Show Price
- Rounding Digits: 0 (zero)
* Apply to all
2/ Go to Configuaration -> Currencies -> Select your Currency -> Decimals: 0 (zero)
* Apply to the specified currency
3/ Go to Orders & Shoppers -> Shopper Groups -> select -anonymous-:
- Select Enable shoppergroup specific price display
- Select Show Prices
- Select any price display as you want in Show Price
- Rounding Digits: 0 (zero)
* Apply to the specified shoppergroup
This works, however it applies to ALL currencies, and it removes the (.00) $xxx.00 at the end of all currencies. Any thoughts on how to apply it to specific currencies and to keep the .00 at the end?
Hello,
I think this could be done if you write some code. For example when the specific currency is selected then make the rounds manually with the above examples/posts i give you.
In general you could edit your category/default or productdetails/default_prices and do something like
if this curerncy selected then round prices like this else round price like this....
I think you could implemented this
Regards