Hi, I sell online courses through aMember. If someone purchases a course then he sees the course (or courses) purchased in their user dashboard but I'm looking to create a home page where, once the user is logged-in, he can see all the courses he has access to, so he can then click in any of them and enter. I want to make it "pretty" so each course has its own icon but that is fine for me (I know how to deal with those tweaks) I just only want to know if it's possible to achieve that (showing the enrolled courses in any page) using aMember. Any help would be greatly appreciated. Thanks!
I believe you can use Am_Lite API to do it: http://www.amember.com/docs/API/Lite PHP: $links = Am_Lite::getInstance()->getUserLinks();
Thanks!! So, if I have understood I need to create a PHP file with that function and it will return the links to all user's active subscriptions? Thanks again!
Thanks again. I have created a PHP page and have included the Lite.php library. Till here everything is working fine. Then I have added $links = Am_Lite::getInstance()->getUserLinks(); but I think I need to create some type of function so it collects the links and then show them in the page. I am no expert in PHP and am a little bit lost. Can you point me in the right direction? Thanks!
I have come with this code but it is returning NULL: PHP: <?phprequire_once '/home/user/public_html/alumnos/amember/library/Am/Lite.php';$links = Am_Lite::getInstance()->getUserLinks();if($links){ echo '<ul>'; foreach($links as $link) { echo '<li>' . $link . '</li>'; } echo '</ul>';}// always good to see exactly what you are working withvar_dump($links); At this point I'm completely lost... I have tried to log in as another user and then I get array(0) { }
Do you mind to contact us in helpdesk? https://www.amember.com/support I will check what can be wrong.