Support Forum

Welcome! Support Forums have been reactivated

Support Times

Support team is available Monday to Friday
From 12AM to 4PM (UTC Time)

Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

User Points Integration

1 week 5 days ago
Licenses:
JomSocial Active

Hello, we would like to integrate PayPlans into JomSocial to allow for User Points to be awarded based on different actions. I have followed this guide ( documentation.jomsocial.com/wiki/User_Points_System ) to configure user points, but cannot get it to work. Can we get some assistance in the configuration? There are no real examples provided on the page to give guidance on implementation.

The topic has been locked.
1 week 5 days ago
  • Dimas's Avatar
  • Dimas
  • Offline
  • Administrator
  • Posts: 12575
  • Thank you received: 3267
Licenses:
JomSocial Active GURU Active Publisher Expired AdAgency Expired iSEO Expired Socialize Expired

Hi Manny,

What is the action? May i know your code detail, please?

If possible I need your backend and FTP access thank you

The topic has been locked.
1 week 5 days ago
Licenses:
JomSocial Active

Hello Dimas, thank you for the reply. We are essentially looking for a way to create Karma points for different actions in PayPlans. For example, when a user purchases a plan we would like the ability to award them x amount of points. The documentation on the site isn't very specific on where to add the code, so here's what we've done in testing.

Here is my jomsocial_rule.xml in the root of the com_payplans directory:

<?xml version="1.0" encoding="utf-8"?>
<jomsocial>
	<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
	<component>com_payplans</component>
	<rules>
		<rule>
			<name>Purchase a Plan</name>
			<description>Give points when a user purchases a plan.</description>
			<action_string>payplans.thanks</action_string>
			<publish>true</publish>
			<points>1</points>
			<access_level>1</access_level>
		</rule>
    </rules>
</jomsocial>

And here's what I have in com_payplans/views/invoice/view.html.php:
require_once( JPATH_ROOT .'/components/com_community/libraries/core.php' );
include_once(JPATH_ROOT .'/components/com_community/libraries/userpoints.php' );
 
function thanks()
	{
		$act = new stdClass();
		$act->cmd = 'payplans.thanks';
		$act->actor = $userid;
 
		$itemId = $this->getModel()->getId();
		if($itemId){
			$invoice = PayplansInvoice::getInstance($itemId);
			$user    = $invoice->getBuyer(PAYPLANS_INSTANCE_REQUIRE);
			$this->assign('invoice', $invoice);
			$this->assign('user', $user);
			$this->setTpl('complete');
			return true;
 
			$params = new CParameter('');
			$params->set( 'action', 'payplans.thanks');       
 
			if (CUserPoints::assignPoint('payplans.thanks')){
				CActivityStream::addActor($act, $params->toString() );
				}
 
		}

The idea is that when a user purchases a plan, and gets to the "Thank you" page, JomSocial recognizes this and awards points. I will send you the backend information in a PM.

The topic has been locked.
1 week 4 days ago
Licenses:
JomSocial Active

Hello Dimas, I believe I got it working. I was approaching this the wrong way. I updated my code to the following, and I can now see the points awarded.

require_once( JPATH_ROOT .'/components/com_community/libraries/core.php' );
include_once(JPATH_ROOT .'/components/com_community/libraries/userpoints.php' );
CuserPoints::assignPoint('purchase.plan');

The topic has been locked.
1 week 4 days ago
  • Dimas's Avatar
  • Dimas
  • Offline
  • Administrator
  • Posts: 12575
  • Thank you received: 3267
Licenses:
JomSocial Active GURU Active Publisher Expired AdAgency Expired iSEO Expired Socialize Expired

glad to know that :)

The topic has been locked.
Powered by Kunena Forum