Will affiliates get created for their own purchase

  • Posts: 3
  • Thank you received: 0
  • Hikashop Business
9 years 11 months ago #183312

-- HikaShop version -- : 2.3.1
-- Joomla version -- : 3.2.0
-- PHP version -- : 5.5.13

Can an affiliate use their own affiliate link to get credit for their own purchase?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
9 years 11 months ago #183372

Yes.

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

  • Posts: 3
  • Thank you received: 0
  • Hikashop Business
9 years 11 months ago #183491

Can we stop this, we don't want affiliates to get credit for their own purchases?

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 11 months ago #183535

Hi,

Yes it's possible.
In the plugin (plugins/system/hikashopaffiliation/hikashopaffiliation.php) please replace

		} else {
			$partner_id = $order->order_partner_id;
		}

		$userClass = hikashop_get('class.user');
		$user = $userClass->get($partner_id);
By
		} else {
			$partner_id = $order->order_partner_id;
		}

		$config = hikashop_config();
		if($config->get('no_self_affiliation', 1) && $order->order_user_id == $partner_id)
			return true;

		$userClass = hikashop_get('class.user');
		$user = $userClass->get($partner_id);
I just submit same kind of patch for the next HikaShop release but where the default setting for the setting is "0" and not "1" (so the option won't be activated by default like here).

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.062 seconds
Powered by Kunena Forum