How to replace affiliate manager info with parent affiliate's info

Some of our customers ask about possibility to display information about parent affiliate for sub-affiliates instead of Information about Affiliate manager which is available by default in Home screen of an Affiliate panel dashboard. You are able to display information about parent affiliate by customizing affiliate panel theme templates.

Note: If you want to change information about Affiliate Manager, you can proceed using How to change the information about affiliate manager article.

In order to replace affiliate manager info with parent affiliate's info you will need to navigate into Configuration > Design > Affiliate panel theme > edit theme you want to customize. In first step you need to remove original div which contain information about affiliate manager from home.tpl In theme editor search for home.pl and remove following part of the code:

<div class="col-lg-6">
        <div class="panel">
            <div class="panel_content">
                {widget id="AffiliateManager"}
            </div>
        </div>
    </div>
</div>
You can see exact screenshot and highlighted rows at the screenshot below. Once you will be done, do not forget to save edited template.



Now we need to insert our own code into period_stats.stpl template. This code is going to display Parent affiliate Photo, Name, Surname, Email, and some example signup fields data5 and data8. All you need to do is Copy paste the code located below under <!-- period_stats --> row in the period_stats.stpl :
<div class="col-lg-6">
        <div class="panel">
            <div class="panel_content">
                <div class="row">
                    <div class="col-lg-3">
                        <div class="DataField AffiliateManagerPhoto">
                            <img class="ImageData" style="" src="{$parentAffiliate->photo}">
                        </div>
                    </div>
                    <div class="col-lg-9">
                        <div class="AffiliateManagerTitle">##Parent Affiliate##</div>
                        <div class="affiliate-manager-name">
                            <div class="DataField field-without-label">
                                <span class="TextData">{$parentAffiliate->firstname}</span>
                            </div>
                            <div class="DataField field-without-label">
                                <span class="TextData">{$parentAffiliate->lastname}</span>
                            </div>
                        </div>
                        <div class="DataField">
                            <div class="DataFieldLabel">Username</div>
                            <span class="TextData">{$parentAffiliate->username}</span>
                        </div>
                        <div class="DataField">
                            <div class="DataFieldLabel">Data5</div>
                            <span class="TextData">{$parentAffiliate->data5}</span>
                        </div>
                        <div class="DataField">
                            <div class="DataFieldLabel">Data8</div>
                            <span class="TextData">{$parentAffiliate->data8}</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="row">
</div> 

This is the screenshot from the period_stats.stpl template after pasting the code:



Once you will be done, do not forget to save edited template.

Now if affiliate choose this theme as his active theme or you will Set as default this theme for all affiliates, including existing affiliates in Configuration > Design > Affiliate theme > Set as default > Apply for all existing affiliates



Your affiliates will be able to see parent affiliate's info instead of affiliate manager info. This is how will affiliate panel Home looks like:



You can use all data fields which are added in the Signup form, find the fields at Configuration > Affiliate signup > Fields

List of some variables which can be used about Parent affiliate is here: 

{$parentAffiliate->firstname} - Parent affiliate First name
{$parentAffiliate->lastname} - Parent affiliate Last name
{$parentAffiliate->username} - Parent affiliate email
{$parentAffiliate->photo} - Parent affiliate photo
{$parentAffiliate->refid} - Parent affiliate referral ID
{$parentAffiliate->data1} - Parent affiliate signup data1
{$parentAffiliate->data2} - Parent affiliate signup data2
{$parentAffiliate->data3} - Parent affiliate signup data3
.
.
.
{$parentAffiliate->data25} - Parent affiliate signup data25

 

×