Rounding and decimal in the component AlphaUserPoi
- unlockalicante
-
Topic Author
- Offline
Less
More
12 years 8 months ago - 12 years 8 months ago #140191
by unlockalicante
Rounding and decimal in the component AlphaUserPoi was created by unlockalicante
-- 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!
-- 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!
Last edit: 12 years 8 months ago by unlockalicante.
Please Log in or Create an account to join the conversation.
12 years 8 months ago #140194
by nicolas
Replied by nicolas on topic Rounding and decimal in the component AlphaUserPoi
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 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.
- unlockalicante
-
Topic Author
- Offline
12 years 8 months ago #140206
by unlockalicante
Replied by unlockalicante on topic Rounding and decimal in the component AlphaUserPoi
Solved!
Again, thanks for the speed and efficiency!
Greetings.
Again, thanks for the speed and efficiency!
Greetings.
Please Log in or Create an account to join the conversation.
Time to create page: 0.232 seconds