Tips and Tricks HQ Support Portal › Forums › WP Affiliate Platform › Exporting Affiliates to a file?
Tagged: export
- This topic has 6 replies, 2 voices, and was last updated 14 years, 7 months ago by IlluminatorLady.
-
AuthorPosts
-
April 9, 2010 at 7:29 pm #1046IlluminatorLadyMember
Hi there,
Is there a way I can export my affiliate list to a file?
Thank you!
Lisa
April 10, 2010 at 1:35 am #19534amin007ParticipantBy “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 document
April 10, 2010 at 2:20 am #19535IlluminatorLadyMemberThanks, 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 #19536amin007ParticipantIf 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 #19537IlluminatorLadyMemberI’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?
Thank you!
Lisa
April 12, 2010 at 5:47 am #19538amin007ParticipantLOL… 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.
<?php
include_once('../../../wp-load.php');
global $wpdb;
$affiliates_table_name = $wpdb->prefix . "affiliates_tbl";
$resultset = $wpdb->get_results("SELECT * FROM $affiliates_table_name ORDER BY refid DESC", OBJECT);
if ($resultset)
{
foreach ($resultset as $record)
{
echo "<br />";
echo $record->refid;
echo ', ';
echo $record->firstname." ".$record->lastname;
}
}
else
{
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 #19539IlluminatorLadyMemberThank 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.
With appreciation,
Lisa
-
AuthorPosts
- You must be logged in to reply to this topic.