*

lbsib

  • **
  • 17 posts
[Help] Count Referrals per User?
« on: April 06, 2023, 03:16:34 PM »
Hello y'all,
is there a function to count the referrals per user? Like osp_count_ref_user (MADKAT)  and then it turns out: 69
Or something like that? I couldn't find an answer here.

Thanks for your help

*

MB Themes

Re: [Help] Count Referrals per User?
« Reply #1 on: April 08, 2023, 01:42:11 PM »
I do not think referral code is stored
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Wiz

  • ****
  • 145 posts
Re: [Help] Count Referrals per User?
« Reply #2 on: April 09, 2023, 06:52:46 AM »
Useful feature as it would help as track users with most referrals, place limits and monitor for possible abuse when credits per referral is enabled.

The referral code is unique to each user and is generated using s_secret and user id. It's straightforward to create a stat table, like voucher_stats, under t_user or pay plugin tables and store user id, referral code, successful referrals, timestamp and referred users etc.

*

MB Themes

Re: [Help] Count Referrals per User?
« Reply #3 on: April 09, 2023, 07:17:26 PM »
Stats table is not needed, just 1 extra field in user table to store referral code used on registration page.
In this way you woukd be able to see all users refistered with referral
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

lbsib

  • **
  • 17 posts
Re: [Help] Count Referrals per User?
« Reply #4 on: April 12, 2023, 04:42:48 PM »
Yes that would be great, how would I go about adding this 1 extra field in the user table?
We currently have a case where it would be great to have it easier seen.

Is there also a way to export the logs of osclass pay plugin for example into a csv or something like that for easier data analysis?

*

MB Themes

Re: [Help] Count Referrals per User?
« Reply #5 on: April 19, 2023, 01:50:18 PM »
You can download osp_t_log table.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots