{docurl}
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
Records in this category
- When I attempt to use the example filters provided in the 4.x documentation for the module I get errors. Why?
- What tokens are available to display the order's shipping method?
- We would like to display the Attribute Prompt in the export instead of the code. Is this possible?
- Is there any way to make our file name "dynamic" by including the current time or date?
- How do I display data from Affiliate Manager in the orders exported by Generic Orders Export?
- How do I display the Custom Product Fields and Custom Customer Fields in the export?
- How do I display data from third party modules in my export? For example, how do I display the note from Inventory Manager?
- Alternate ways to display the product and attribute data in exports














