Serious bug with Alphauserpoints plugin

  • Posts: 121
  • Thank you received: 7
10 years 9 months ago #116347

Hi there,

I user AUP to provide points to users as a percentage of their purchase prices. I noticed some discrepancies in user's points since I installed Hikamarket. It appears that the 'sub-orders' that Hikamarket generates for vendors also provide points to users! As an example, if a user was supposed to earn 500 points from a purchase, they will earn 500 points plus another 500 points for the vendor 'sub-orders'.

This is an extremely serious bug for me that has generated a huge amount of erroneous points. For now I'm disabling HikaMarket plugin. Can you please look into this for me? Thanks,

Jeremy

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

  • Posts: 26032
  • Thank you received: 4006
  • MODERATOR
10 years 9 months ago #116384

Hi,

We made a new implementation of the integration plugin with AlphaUserPoints but the plugin is not finished yet.

For the moment you can edit the plugin "plugins/hikashoppayment/alphauserpoints/alphauserpoints.php" and replace the code:

	function onAfterOrderUpdate(&$order,&$send_email){
		$method = $this->getMethod();
		if(!isset($order->order_status))
			return true;
		$this->_giveAndGiveBack($order, $method, 0);
	}
By
	function onAfterOrderUpdate(&$order,&$send_email){
		$method = $this->getMethod();
		if(!isset($order->order_status))
			return true;
		if( !empty($order->order_type) && $order->order_type != 'sale' )
			return true;
		$this->_giveAndGiveBack($order, $method, 0);
	}

And the code:
	function onAfterOrderCreate(&$order,&$send_email){
		$app =& JFactory::getApplication();
		if($app->isAdmin()) {
			return true;
		}
By:
	function onAfterOrderCreate(&$order,&$send_email){
		$app =& JFactory::getApplication();
		if($app->isAdmin()) {
			return true;
		}
		if( !empty($order->order_type) && $order->order_type != 'sale' )
			return true;
It will not process points for other things that the HikaShop orders.

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.

  • Posts: 121
  • Thank you received: 7
10 years 4 months ago #138506

Hi Jerome,

Sorry to resurrect this old topic.

I disabled Hikamarket after this problem and haven't used it since. I'm wondering if you have officially fixed this bug in the meantime? Or if I would still need to manually apply the fix you showed here?

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

  • Posts: 26032
  • Thank you received: 4006
  • MODERATOR
10 years 4 months ago #138507

Hi,

The day that I posted the patch, I submitted it too.
So It's fixed since HikaShop 2.2.2

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.

  • Posts: 121
  • Thank you received: 7
10 years 4 months ago #138511

Thank you Jerome. One more question (perhaps this is more general Hikashop-related?): does it matter that I'm still using the old AUP plugin? I have not switched to the Hikashop-specific version you guys made. I'm a bit scared to, to be honest. I can't afford to mess up thousands of users points.

And if I did transition, what would be the advantage?

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

  • Posts: 26032
  • Thank you received: 4006
  • MODERATOR
10 years 4 months ago #138542

Hi,

You can still use the old plugin but you have to know that it won't be updated anymore (except if we found a bug into).
The new system "user points" is compatible with AUP so you won't loose your points (which are stored into AUP).
It allow new options and features, the really important point is the separation between the "gain" and the "earn" of points.
So you can have a lot of different configurations to earn points, depending the category, the sum, the access level, etc.

If your configuration is good like that, you do not have specific reason to change.

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.

Moderators: Obsidev
Time to create page: 0.062 seconds
Powered by Kunena Forum