Points earned by the referent is added but not subtract from the initial user gain

More
7 years 1 month ago #37274 by Piero
Hello, in the rule referralpoints the percentage of points earned by the referent is added but not subtract from the initial user gain.
For my system is not good because it is altered the real total gain, you can make this change?
If you think it's not right for everyone, would you be kind enough to show me how to do it, I need that.
Thank you.
Piero.

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

More
7 years 1 month ago #37370 by Piero
Hello, I tried to make the abovementioned amendment inserting in: components / com_altauserpoints / helper.php
after the line nr.237 this code

$db = &JFactory::getDBO();
$sql2 = "UPDATE ocuat_alpha_userpoints SET points = points - '$referraluserpoints' WHERE referreid = '$referrerid'";
$db->setQuery($sql2);
$db->query();

but no good because they take off their points to refferal user instead of referreid.
Where is the error?
Thanks in advance.

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

More
7 years 4 weeks ago #37503 by nordmograph
If you update the points like this, you'll loose it on next user sync.
You need to insert also a points activity in #__alpha_userpoints_details.

Sorry for the late reply but understand custom dev is not part of the support.

- Need help? Post the URL of the related page (eventualy as confidential info), it will help solve your issue faster.
- An error, notice or warning? report the exact message including the line number
- If you get a white page , enable error reporting and / or check your server error logs.

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

Time to create page: 0.301 seconds
Powered by Kunena Forum
Disclaimer: Nordmograph is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.