- Posts: 20
- Thank you received: 0
Part Points. Half points. Rounding. AlphaUserPoint
- AcresPetProducts
-
Topic Author
- Offline
Less
More
12 years 2 months ago #164912
by AcresPetProducts
Is it possible to have AUP and HikaShop assign part points?
As an example we have a product that sells for $75.00
$10 = 1 point
So what is happening is this is being rounded up to 8 points when in fact we want it to be 7.5 points or just 7 points as it is not a full $10 spend for a point.
I've read the FAQ's and searched the forums on anything I can think of for search terms and haven't found anything so I hope I'm not posting unnecessarily.
Many thanks
Acres
As an example we have a product that sells for $75.00
$10 = 1 point
So what is happening is this is being rounded up to 8 points when in fact we want it to be 7.5 points or just 7 points as it is not a full $10 spend for a point.
I've read the FAQ's and searched the forums on anything I can think of for search terms and haven't found anything so I hope I'm not posting unnecessarily.
Many thanks
Acres
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
12 years 2 months ago #164932
by Mohamed Thelji
Replied by Mohamed Thelji on topic Part Points. Half points. Rounding. AlphaUserPoint
Hi,
As it's said on that thread :
So you should probably use the HikaShop User Points payment plugin
As it's said on that thread :
They are both payment plugins, but the difference is that Hikashop AlphaUserPoints Plugin is the old one (deprecated now) so you'll have to use the HikaShop User Points payment plugin.
So you should probably use the HikaShop User Points payment plugin
Please Log in or Create an account to join the conversation.
- AcresPetProducts
-
Topic Author
- Offline
Less
More
- Posts: 20
- Thank you received: 0
12 years 2 months ago #165044
by AcresPetProducts
Replied by AcresPetProducts on topic Part Points. Half points. Rounding. AlphaUserPoint
Thanks Mohamed
Had an issue with updating to the latest version of HikaShop Business which Nicolas knows about.
We are testing and debugging on a copy of the website before updating again. We have to schedule a maintenance window to do it anyway.
The part points or in our case half points issue needs to be resolved and we could leave it until we do this maintenance update.
Having said that will HikaShop User Points do part points/half points/rounding down? I only ask as this was the original question and would rather not plan a migration of AUP to HUP to find it won't do it anyway.
Thanks Mohamed
Acres
Had an issue with updating to the latest version of HikaShop Business which Nicolas knows about.
We are testing and debugging on a copy of the website before updating again. We have to schedule a maintenance window to do it anyway.
The part points or in our case half points issue needs to be resolved and we could leave it until we do this maintenance update.
Having said that will HikaShop User Points do part points/half points/rounding down? I only ask as this was the original question and would rather not plan a migration of AUP to HUP to find it won't do it anyway.
Thanks Mohamed
Acres
Please Log in or Create an account to join the conversation.
12 years 2 months ago #165117
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Part Points. Half points. Rounding. AlphaUserPoint
Hi,
There is no option in AlphaUserPoints or in UserPoints to choose the round mode for the earn points.
For that part, the code in UserPoints plugin is the same than in the AlphaUserPoints one.
But you can edit the plugin "plugins/hikashop/userpoints/userpoints.php" and replace
By:
And the file "plugins/hikashop/userpoints/userpoints_configuration.php", replacing
By
It will add the new option for the rounding mode.
Regards,
There is no option in AlphaUserPoints or in UserPoints to choose the round mode for the earn points.
For that part, the code in UserPoints plugin is the same than in the AlphaUserPoints one.
But you can edit the plugin "plugins/hikashop/userpoints/userpoints.php" and replace
Code:
return round($points, 0);
Code:
if($this->plugin_params->rounddown)
return floor($points);
return round($points, 0);
And the file "plugins/hikashop/userpoints/userpoints_configuration.php", replacing
Code:
<td><?php
echo JHTML::_('hikaselect.booleanlist', "data[plugin][plugin_params][notgivewhenuse]" , '', @$this->element->plugin_params->notgivewhenuse);
?></td>
</tr>
Code:
<td><?php
echo JHTML::_('hikaselect.booleanlist', "data[plugin][plugin_params][notgivewhenuse]" , '', @$this->element->plugin_params->notgivewhenuse);
?></td>
</tr>
<tr>
<td class="key">
<label for="data[plugin][plugin_params][rounddown]"><?php
echo JText::_('POINTS_ROUND_DOWN');
?></label>
</td>
<td><?php
echo JHTML::_('hikaselect.booleanlist', "data[plugin][plugin_params][rounddown]" , '', @$this->element->plugin_params->rounddown);
?></td>
</tr>
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Time to create page: 0.193 seconds