fyreflyX Posted March 26, 2016 Share Posted March 26, 2016 Wondering f there is a way to display Manual Commission Entries added to an Affiliate account on the affiliates.php template? The page currently only lists referrals, but I would like to also display the date, description and amount added when using "Add Manual Commission Entry". Thanks 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 26, 2016 Share Posted March 26, 2016 i'm not sure if you're talking about the client or admin areas - there is an affiliates.php in each! if you mean the client area, they you could use an action hook to query the database to get the information and pass the array back to the template. if in the admin area, it would probably be easier to edit the affiliates report - but the solution to both will be the same SQL query... off the top of my head, I don't know what it would be, but I think it would be the tblaffiliatehistory table that would need to be checked. 0 Quote Link to comment Share on other sites More sharing options...
fyreflyX Posted March 26, 2016 Author Share Posted March 26, 2016 I was looking for the Client area - so the Affiliate could see the manual commissions I entered. Thank you for the quick reply! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 27, 2016 Share Posted March 27, 2016 I was looking for the Client area - so the Affiliate could see the manual commissions I entered. ok, it's the client area - that gives you options. the easier way would be to add a second html table in the template - the information you're wanting (date, description and amount) should just require a simple query to the tblaffiliatehistory table... if it's a hook, pass the array back to the page and output the array in a foreach loop. the complicated way, which would remove the need for editing the template, would be to take the SQL query that already generates the $referrals array and join your second sql array to it - but looking at the $referrals array, that query must use multiple joins to get all the data from numerous different tables, so it would be a more complex query to create. 0 Quote Link to comment Share on other sites More sharing options...
fyreflyX Posted March 27, 2016 Author Share Posted March 27, 2016 Thanks, Brian. Will give it a try 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.