Is there any way to configure specific global headers and footers for each affiliate that will show up any time a customer they referred is shopping in the store?
There is a sub-tab for each individual affiliate (and also on the main "Options" tab where defaults can be set) that permits particular "design settings" to be configured for that affiliate (and as a default on the main "Options" tab). Soon these "design settings" will include most of the store's configuration options (such as fonts, colors, etc.) but currently only the Global Header and Footer are supported.
You'll find the fields to specify the header and footer on the "Design Settings" tabs.
Once configured, the global header and footer can be displayed with the token:
&mvt:global:AffiliateData:GLOBAL_HEADER;
which will NOT process any tokens in the field. In the alternative, you can have the Affiliate Manager process the field for the same tokens that are available for use in the invoice by using the item:
<mvt:item name="BROK_AFFILIATES" param="GLOBAL_HEADER" />
(in both of those cases you would display the global footer by changing GLOBAL_HEADER to GLOBAL_FOOTER).
In addition, the module sets a global variable:
g.AffiliateData:use_design
which will have a value of 1 if the module has been configured to use the Design Settings (currently just the global header and footer) for that affiliate. So you can conditionally display the global header by checking that variable. For example, to display the affiliate's global header if that affiliate has been configured to use the design settings and to display the default global header if not you would put the conditional around the standard global_header token:
<mvt:if expr="g.AffiliateData:use_design" >
<mvt:item name="BROK_AFFILIATES" param="GLOBAL_HEADER" />
<mvt:else>
<mvt:item name="hdft" param="global_header" />
</mvt:if>
Similarly, for the footer:
<mvt:if expr="g.AffiliateData:use_design" >
<mvt:item name="BROK_AFFILIATES" param="GLOBAL_FOOTER" />
<mvt:else>
<mvt:item name="hdft" param="global_footer" />
</mvt:if>
Unfortunately, due to the way Merchant has separate templates for each page in the store you would need to make this change in each template.
To determine if the affiliate specific design settings should be used, the module first checks to see if the individual affiliate is configured on it's "Design Settings" tab to use the settings. If not, it checks to see if default "Use design settings?" option is set (on the "Design Settings" tab under "Options"). If that is set, the module uses the settings configured on that tab, if not, then the module does not display anything for the design settings.
To get a bit more detailed on how the "design settings" feature works will require more technical detail. The "design settings" feature actually sets a global structure variable g.AffiliateData which contains all of the referring affiliate's data in it (you'll obviously want to be careful what of the affiliate's data you expose to your customers). For example, the affiliate's first name is set in the variable:
g.AffiliateData:fname
and this can be displayed in the template,without token processing, with the token
&mvt:global:AffiliateData:fname;
and with token processing with the item:
<mvt:item name="BROK_AFFILIATES" param="fname">
NOTE that for the item to work you'll need to make sure that the module's item, BROK_AFFILIATES is assigned to the template in which you're using it.
Last update: 2008-04-10 15:06
Author: Thor
Revision: 1.0
You cannot comment on this entry
Most Recent FAQ Entries: 
- When I attempt to add one of your module's ... (2008-05-09 13:40)
- Creating "Google Friendly" Product Links (2008-05-05 12:19)
- How do I display data from third party modules ... (2008-05-02 15:58)
- is there a way to change the font color ... (2008-04-15 22:11)
- Is it possible to display data about the referring ... (2008-04-10 15:08)
Top 10 
- 2129 views:
Why won't you call me for technical support? I ... - 2032 views:
Are license keys valid for more than one store? ... - 1976 views:
I'm trying to enter a license key and get ... - 1897 views:
Is there a way to "Limit" the number of ... - 1883 views:
How do I install a module? - 1879 views:
Adding Tokens to Evaluate Expressions - 1786 views:
How can display and change the parameters of an ... - 1751 views:
How do I check for a module upgrade? - 1642 views:
The total on my checkout pages are not correct. ... - 1609 views:
I have select and radio type attributes in my ...
















