Rounding and decimal in the component AlphaUserPoi

  • Posts: 8
  • Thank you received: 0
10 years 10 months ago #140191

-- url of the page with the problem -- : www.apli.movil-plus.com
-- HikaShop version -- : 2.0.0
-- Joomla version -- : 3.1.5


Good afternoon, I resort to this means, I do not find anything on the network, or in this forum.

I have the AlphaUserPoints component installed HikaShop along recharging system by Paypal, so far so good.

The problem is that when I try to pay for an item, the price always rounds, as seen in the picture.

I think I have the options correctly. Would appreciate a help from someone to present the same problem as me.

Thanks in advance!

Attachments:
Last edit: 10 years 10 months ago by unlockalicante.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
10 years 10 months ago #140194

Hi,

The price doesn't round, but yes, the points are always rounded in order to be integers. There is no option to change that as that's the normal behavior.
You would have to edit the code of the AlphaUserPoints if you wanted to change the rounding precision to 2 decimals.
For that, you should change the line:
return round($pointsDecrease, 0);

to:
return round($pointsDecrease, 2);
in plugins/hikashoppayment/userpoints/userpoints.php

The following user(s) said Thank You: unlockalicante

Please Log in or Create an account to join the conversation.

  • Posts: 8
  • Thank you received: 0
10 years 10 months ago #140206

Solved!

Again, thanks for the speed and efficiency!

Greetings.

Please Log in or Create an account to join the conversation.

Time to create page: 0.056 seconds
Powered by Kunena Forum