Part Points. Half points. Rounding. AlphaUserPoint

  • Posts: 20
  • Thank you received: 0
10 years 4 months ago #164912

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

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

  • Posts: 12953
  • Thank you received: 1778
10 years 4 months ago #164932

Hi,
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.

  • Posts: 20
  • Thank you received: 0
10 years 4 months ago #165044

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

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 4 months ago #165117

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

		return round($points, 0);
By:
		if($this->plugin_params->rounddown)
			return floor($points);
		return round($points, 0);

And the file "plugins/hikashop/userpoints/userpoints_configuration.php", replacing
			<td><?php
				echo JHTML::_('hikaselect.booleanlist', "data[plugin][plugin_params][notgivewhenuse]" , '', @$this->element->plugin_params->notgivewhenuse);
			?></td>
		</tr>
By
			<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>
It will add the new option for the rounding mode.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.072 seconds
Powered by Kunena Forum