Jump to content
gibs

Rounding error in price

Recommended Posts

Hi there,

On my Blesta store I'm accepting Bitcoin using Bitpay. Sometimes the items are configured with a price of "0.00801" Bitcoins, the problem is this value is displayed as "0.00" when visiting the client-side store, and can be ordered for this price (free).

I have configured the BTC currency to have a precision of 4, which is the max.

 

The price should not be rounded up to "0.00" because this means the user gets the product for free.

Also the price should be displayed correctly in the client-area.

I am running version 4.3.0.

 

Thanks

Share this post


Link to post
Share on other sites

I suggest defining the price in your normal currency and allowing Bitpay to convert it automatically. If selling in BTC, I think it'd probably be better to define the price in mBTC so that your 0.00801 BTC would be represented as 8.01 mBTC. However, some changes to the gateway may be necessary for that kind of representation.

We use the Bitpay gateway and it automatically converts USD to BTC, it's what I would recommend doing.

Share this post


Link to post
Share on other sites
8 hours ago, Paul said:

I suggest defining the price in your normal currency and allowing Bitpay to convert it automatically. If selling in BTC, I think it'd probably be better to define the price in mBTC so that your 0.00801 BTC would be represented as 8.01 mBTC. However, some changes to the gateway may be necessary for that kind of representation.

We use the Bitpay gateway and it automatically converts USD to BTC, it's what I would recommend doing.

Thank you for the suggestion. How would I accomplish this?

I tried setting USD as the default currency, gave BTC an exchange rate of "1.0", removed BTC pricing from the products, and disabled the "Use Package Pricing for New Services Only" setting under Currency Setup.
I am unsure how to display the price as mBTC instead of BTC.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×