How do I display data from Affiliate Manager in the orders exported by Generic Orders Export?
The Affiliate Manager can now provide information about the referring affiliate and the resulting order for the Generic Orders Export module.
At the top of the field in the Generic Orders Export template that you want to dispaly the affiliate data add the item/token:
<mvt:item name="BROK_AFFILIATES" param="define_variables" />
when that token is processed it defines certain global variables:
g.AffiliateData:code
g.AffiliateData:id
g.AffiliateData:fname
g.AffiliateData:lname
g.AffiliateData:email
g.AffiliateData:company
g.AffiliateData:phone1
g.AffiliateData:phone2
g.AffiliateData:fax
g.AffiliateData:address
g.AffiliateData:city
g.AffiliateData:state
g.AffiliateData:country
g.AffiliateData:payout
g.AffiliateData:referredby
These can then be displayed in the Generic Orders Export module with the %var|expression|% token. For example,
%var|g.AffiliateData:code|%
will display that order's referring affiliate code (if there one).
As an example, the Generic Orders Export template for the "Merchant Flat File Default"'s Order area has the contents:
%orderid%|%processed%|%orderdate%|%ordertime%|%ship_fname%|%ship_lname%|%ship_email%|%ship_comp%|
%ship_phone%|%ship_fax%|%ship_addr%|%ship_city%|%ship_state%|%ship_zip%|%ship_cntry%|%bill_fname%|
%bill_lname%|%bill_email%|%bill_comp%|%bill_phone%|%bill_phone%|%bill_fax%|%bill_addr%|%bill_city%|%bill_state%|
%bill_zip%|%bill_cntry%|%prodcode%|%prodname%|%produpsold%|%prodprice%|%prodquantity%|%attrcode%|%optcode%|%attrprice%|
%totaltax%|%totalshipping%|%ordertotal%|
To display the affiliate's code at the end of that template you would add the <mvt:item at the beginning and the %var|g.AffiliateData:code|% to the end. So you would have:
<mvt:item name="BROK_AFFILIATES" param="define_variables" />
%orderid%|%processed%|%orderdate%|%ordertime%|%ship_fname%|%ship_lname%|%ship_email%|%ship_comp%|
%ship_phone%|%ship_fax%|%ship_addr%|%ship_city%|%ship_state%|%ship_zip%|%ship_cntry%|%bill_fname%|
%bill_lname%|%bill_email%|%bill_comp%|%bill_phone%|%bill_phone%|%bill_fax%|%bill_addr%|%bill_city%|%bill_state%|
%bill_zip%|%bill_cntry%|%prodcode%|%prodname%|%produpsold%|%prodprice%|%prodquantity%|%attrcode%|%optcode%|%attrprice%|
%totaltax%|%totalshipping%|%ordertotal%|%var|g.AffiliateData:code|%
Note, this will also work in other modules besides Generic Orders Export. It requires only that the l.settings variable has the order's data stored in l.settings:order.
Last update: 2008-03-31 21:43
Author: Thor
Revision: 1.0
You cannot comment on this entry
Most Recent FAQ Entries: 
- Alternate ways to display the product and attribute data ... (2008-09-02 18:40)
- Adding both "Add All to Basket" and "Add to ... (2008-09-01 09:46)
- When adding a product to the basket from an ... (2008-08-27 19:02)
- 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)
Top 10 
- 2940 views:
Adding Tokens to Evaluate Expressions - 2872 views:
Is there a way to "Limit" the number of ... - 2793 views:
Why won't you call me for technical support? I ... - 2682 views:
Are license keys valid for more than one store? ... - 2580 views:
I'm trying to enter a license key and get ... - 2569 views:
How do I install a module? - 2413 views:
How do I check for a module upgrade? - 2375 views:
How can display and change the parameters of an ... - 2220 views:
The total on my checkout pages are not correct. ... - 2018 views:
I have select and radio type attributes in my ...
















