1. Ben James
  2. General
  3. Thursday, October 08 2015, 11:49 AM
Hello,
My registration now is setup to work with different 'roles' (easy profile field)

I have 3 roles and there are different fields to complete for each role.

1. I would like to set a link to the plugin of payment gateway on the registration button ( ONLY WHEN ROLE='A' )
the rest roles I would like to work as they do now activate the profile by default, with no interruption on the registration.
2. I have added a hidden field payment on the field of that role.
I would like to update this role based on the return url of my payment gateway
3. I would like to update all the profiles of role A only if payment =true

Any help on that?
admin Accepted Answer
Admin
Hi,
you can simply add a PHP code to launch a query after payment:
$db=JFactory::getDbo();
$user=JFactory::getUser();
$query='UPDATE #__jsn_users SET role = "A" WHERE id='. $user->id;
$db->setQuery($query);
$db->execute();


TIP: many subscription components have a feature to laungh SQL query when subscription is active. So try to check if your component do this. But I don't know if you can do this with Virtuemart.

NOTE: this code is not tested and not supported, it is only for example purpose.
  1. more than a month ago
  2. General
  3. # 1
Ben James Accepted Answer
Pro
and how i will do the following:
1. I would like to set a link to the plugin of payment gateway on the registration button ( ONLY WHEN ROLE='A' )
the rest roles I would like to work as they do now activate the profile by default, with no interruption on the registration.
  1. more than a month ago
  2. General
  3. # 2
admin Accepted Answer
Admin
Sorry, but this is not possible with a simple way, you need to create a very complex user plugin.

Easy Profile extends Joomla user management, so registration and edit profile pages are the same of Joomla,

EDIT:
to check user fieldvalue you can use a simple query or use our API (see doc at https://www.easy-profile.com/docs/38-jsnuser-object.html)
  1. more than a month ago
  2. General
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.
Sorry, the discussion is currently locked. You will not be able to post a reply at the moment.