Tips and Tricks HQ Support Portal › Forums › WP Affiliate Platform › Exporting Affiliates to a file?
- This topic has 6 replies, 2 voices, and was last updated 12 years, 11 months ago by IlluminatorLady.
April 9, 2010 at 7:29 pm #1046
Is there a way I can export my affiliate list to a file?
LisaApril 10, 2010 at 1:35 am #19534
By “list of my affiliate” do you mean their email addresses or affiliate IDs?
You can get an email list (comma separated) of all your affiliates from the “Affiliate Emails” tab in the “Manage Affiliates” menu. Copy and paste it to a documentApril 10, 2010 at 2:20 am #19535
Thanks, I should have been more specific.
I need a listing of Affiliate Names and IDs, at a minimum. Is there I can do this fairly simply?April 11, 2010 at 12:57 am #19536
If you can code in PHP then yes you can do this fairly simply
No, there is no feature that just gives you the affiliate names and IDs.
If you are willing to do some coding then let me know and I will give you some guidance.April 11, 2010 at 12:42 pm #19537
I’ve done a lot of coding in my time but haven’t taken the time to learn PHP yet. But it looks as though now is the time to bite the bullet.
So yes, I’ll take some guidance as to what the steps I need to follow are.
Also, can you recommend a good PHP/MySQL book to get me started?
LisaApril 12, 2010 at 5:47 am #19538
LOL… since you been nice and I had some free time I put together this simple script that will display all the affiliate ID and their names
Copy and paste it into a file (name it “display_aff_details.php”) and upload that file into the “wp-affiliate-platform” directory then access it from the browser.
$affiliates_table_name = $wpdb->prefix . "affiliates_tbl";
$resultset = $wpdb->get_results("SELECT * FROM $affiliates_table_name ORDER BY refid DESC", OBJECT);
foreach ($resultset as $record)
echo "<br />";
echo ', ';
echo $record->firstname." ".$record->lastname;
echo 'No Affiliates found.';
I am sure you can tweak it to display more information and format the output however you want it. Any problem let me know.
Still interested in a good PHP & MySQL book?April 13, 2010 at 1:46 pm #19539
Thank you so much!! I will give it a run as soon as I can.
I am paging through the W3 Schools PHP tutorial for now (http://www.w3schools.com/PHP/), hoping that gives me enough of the basics to find my way around.
- You must be logged in to reply to this topic.