ScottN Posted February 28, 2016 Share Posted February 28, 2016 The WHMCS Affiliate documentation says: Activating an AffiliateClients can activate their affiliate account from the client area but you as an admin can do it from the client summary page also. To do that, locate the client you want to activate using the search or client list and then in the Actions panel click the Activate as Affiliate link. When I log in as a client, and go to their Client Area, there is NOTHING about the Affiliate system. If I manually activate them from the admin side, THEN there is an Affiliate Program section on their Client area. How can I set it up so that clients can "activate their affiliate account" like the documentation states? We are using the "six" theme, if that matters. Thanks! - Scott 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 28, 2016 Share Posted February 28, 2016 Scott, have you enabled the Affiliate system on the admin side? setup -> general settings -> affiliates -> Enable/Disable if the checkbox is ticked, then clients should see an "Affiliates" link in the menu; if it's not enabled, then there is no link. 0 Quote Link to comment Share on other sites More sharing options...
ScottN Posted February 28, 2016 Author Share Posted February 28, 2016 Hi Brian! Yes, indeed, it is checked. Here are screen shots of it being enabled, and a screen shot of a random customer's Client Area: Any other ideas? - Scott 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 28, 2016 Share Posted February 28, 2016 using the Six template, when a client is logged, they should see this on the navbar... in fact, with the Affiliates system enabled, there should be an Affiliates link on the navbar whether they're logged in or not - if it's not there for you, perhaps there is a hook removing it ? 0 Quote Link to comment Share on other sites More sharing options...
ScottN Posted February 28, 2016 Author Share Posted February 28, 2016 We are using a custom navbar, so I'm not surprised it's missing from the menu. But the documentation says nothing about the navbar and that's not my question. The docs say it should show up in the CLIENT AREA. I would like it to show up there, per the docs, but it's not there? - Scott 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted February 28, 2016 Share Posted February 28, 2016 The docs say it should show up in the CLIENT AREA I think they mean the navbar, what else you need to display there? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 28, 2016 Share Posted February 28, 2016 i'd agree with sentq on this - I would take the clientarea as being everything the client sees (including the navbar) when they login (the clientarea navbar changed when logged in) - now, if you've got a custom navbar, then fair enough it's not there - you just need to add a link somewhere to affiliates.php and the clients can activate their account. 0 Quote Link to comment Share on other sites More sharing options...
ScottN Posted February 29, 2016 Author Share Posted February 29, 2016 Hmmm, OK. I thought "Client Area" was the screen that clients see when they first login. When I manually activate the customer as an Affiliate, then a new "Affiliate Program" widget shows up in the Client Area: Sounds like I will have to work on the menu, then (and try to re-learn what Client Area means). Thanks guys! - Scott 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 29, 2016 Share Posted February 29, 2016 Scott, alternatively, you could add a home page panel (widget) that includes a link to the affiliate page - simply create a file in includes/hooks and call it 'affiliateinvitepanel.php' and add the code below... <?php use WHMCS\View\Menu\Item; add_hook('ClientAreaHomepagePanels', 1, function (Item $homePagePanels) { $client = Menu::context('client'); $affiliate = $client->affiliate; if (!$affiliate){ $homePagePanels->addChild('Affiliate Invite', array( 'label' => Lang::trans('clientHomePanels.affiliateProgram'), 'icon' => 'fa-group', 'order' => 300, 'extras' => array( 'color' => 'teal', 'btn-link' => 'affiliates.php', 'btn-text' => Lang::trans('moreDetails'), 'btn-icon' => 'fa-arrow-right',), 'bodyHtml' => "<p>If you would like to take part in our Affiliate Program, click <a href=\"affiliates.php\">here</a> to activate your Affiliate account.</p>", )); } }); if the client is not currently an affiliate, it will show the panel below inviting them to join the program; if they are already an affiliate, then the above panel won't appear, but the one in your screenshot will - i've designed the invite panel to match the existing affiliate panel and will appear in the same location too. feel free to change the text! 0 Quote Link to comment Share on other sites More sharing options...
ScottN Posted February 29, 2016 Author Share Posted February 29, 2016 Brian! That is amazing!! Thank you!!!!!!!! It looks and works great!! I looked over the docs and don't readily see how one can change the order of the panels. Is that possible? - Scott 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 29, 2016 Share Posted February 29, 2016 Brian! That is amazing!! Thank you!!!!!!!! It looks and works great!!I looked over the docs and don't readily see how one can change the order of the panels. Is that possible? yes - their default values are shown in the table on the page below... http://docs.whmcs.com/Working_With_Client_Area_Home_Page_Panels#Default_Panels but to alter them, you need to use a hook - so if we take the "Domains Expiring Soon" panel as an example, it currently has an order value of 50, which means it's shown close to the top after unpaid and overdue invoices... let's say we want to move it to the very bottom of the page, we would just change it's order value to 600 (or anything greater than 500). <?php use WHMCS\View\Menu\Item; add_hook('ClientAreaHomepagePanels', 1, function (Item $homePagePanels) { if (!is_null($homePagePanels->getChild('Domains Expiring Soon'))) { $homePagePanels->getChild('Domains Expiring Soon') ->setOrder(600); } }); in practice, if you were changing the order of a number of panels at the same time, you could change them all in the same hook file... <?php use WHMCS\View\Menu\Item; add_hook('ClientAreaHomepagePanels', 1, function (Item $homePagePanels) { if (!is_null($homePagePanels->getChild('Domains Expiring Soon'))) { $homePagePanels->getChild('Domains Expiring Soon') ->setOrder(600); } if (!is_null($homePagePanels->getChild('Recent News'))) { $homePagePanels->getChild('Recent News') ->setOrder(5); } }); ... just remember to always check that a panel exists before you try to change it - that's what the 'if' statements are for in the above hooks. 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted February 29, 2016 Share Posted February 29, 2016 The code must be probably missing from the six template like other things. Several things are actually missing in v6. For example when a customer has credits in his account, its not displayed anywhere anymore. Unless they go to an invoice. This is actually causing billing tickets because don't believe they have credits left in their account. Another bug in the templating system that does not show the credits anywhere. 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted February 29, 2016 Share Posted February 29, 2016 The code must be probably missing from the six template like other things. Several things are actually missing in v6. For example when a customer has credits in his account, its not displayed anywhere anymore. Unless they go to an invoice. This is actually causing billing tickets because don't believe they have credits left in their account. Another bug in the templating system that does not show the credits anywhere. This might help you: http://forum.whmcs.com/showthread.php?106891-Display-Credit-Balance-In-Six-Template 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.