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>
If you want the Affiliate's header/footer to display on only some pages, then the above approach is the one to take (i.e. replacing the global_header and global_footer items with the conditional) On the other hand, if you want the Affilate's global header/footer to display on every page in your store then instead of modifying each page's template you could modify only the templates for the global header and footer. You can edit them by clicking on the "Global Header & Footer" tab on any page in the 'Pages" section of your store's admin (the same templates will apply to every page that uses the global_header and global_footer items; by default, I think that's every page in stock Merchant).
In the Global Header template you would replace the contents with:
<mvt:if expr="g.AffiliateData:use_design" >
<mvt:item name="BROK_AFFILIATES" param="GLOBAL_HEADER" />
<mvt:else>
contents of default global header
</mvt:if>
and in the Global Footer template:
<mvt:if expr="g.AffiliateData:use_design" >
<mvt:item name="BROK_AFFILIATES" param="GLOBAL_FOOTER" />
<mvt:else>
contents of default global footer
</mvt:if>
Of course, anything that would be common to the Affiliate' headers & footers and the global header & footer can be outside of that conditional so that it will always display.
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-06-02 18:28
Author: Thor
Revision: 1.1
You cannot comment on this entry
Most Recent FAQ Entries: 
- I have the module configured to add the key ... (2008-08-13 14:50)
- What is the format for the htaccess file if ... (2008-08-12 14:50)
- Is there any way to look up a customer's ... (2008-08-06 18:04)
- I am looking for a module that will allow ... (2008-08-06 18:00)
- Is it possible to display a link in Phone ... (2008-08-06 12:05)
Top 10 
- 2754 views:
Adding Tokens to Evaluate Expressions - 2698 views:
Is there a way to "Limit" the number of ... - 2654 views:
Why won't you call me for technical support? I ... - 2549 views:
Are license keys valid for more than one store? ... - 2447 views:
I'm trying to enter a license key and get ... - 2425 views:
How do I install a module? - 2286 views:
How do I check for a module upgrade? - 2255 views:
How can display and change the parameters of an ... - 2097 views:
The total on my checkout pages are not correct. ... - 1932 views:
I have select and radio type attributes in my ...
















