Your cart is currently empty!
Extra data for counter
—
by
Hi
I am building a simple plugin/code to extract some data from my website so that I can show t via a shortcode as a counter.
Here is something similar, you will see a counter – https://www.suttons.co.uk/affiliates
So I would like to find
total number of affiliates
Total number of transactions with affiliate fee created
Total Afiiliate fees to date
Do you have any documentation that says where this information is in the database?
I have done a similar thing extracting some course information via a shortcode and then using Elenetor to add it to a counter
many thanks
Posted in Affiliates Pro
Comments
3 responses to “Extra data for counter”
Hi Richard,
Thanks for mentioning the example page you’re trying to create.
Even though we don’t provide specific API functions to what you’re trying to find, you can still use existing functions from the plugin and achieve the results with some additional tweaks.
For example, in order to get the total count of affiliates, you can use the function affiliates_get_affiliates() as shown here:
https://github.com/itthinx/affiliates/blob/master/lib/core/wp-init.php#L2206
and count the results.
while for referrals, you should have a look at affiliates_get_affiliate_referrals() as shown here:
https://github.com/itthinx/affiliates/blob/master/lib/core/wp-init.php#L2388
the function might be implemented for a specific affiliate, but you can implement your own version based on it and get referrals and amounts for all affiliates.
Feel free to follow-up here if further support is needed with the implementations/customizations.
Kind regards,
George
I have managed to get it working and can now show the number of registered affiliates in the front end. I am hoping that it will attract new my website.
You can see on this page that it says now we currently have xx affiliates – the xx is dynamic and changes – https://trainwithmarka.com/affiliate-area/
Can’t see it on my end as a guest, but perhaps you’re still working on it. Make sure to have a look at my recommendations and once this is done, drop us a line to have a look at the result.:)
Only authorized members can comment on this topic.
Log in