{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:42
Author: Thor
Revision: 1.0
You cannot comment on this entry
Records in this category
- Is it possible to display data about the referring affliate on the Merchant pages and on the Invoice screen and notification emails?
- How do we get multi tier payout this is very important that if level 1 sign ups a level 2 affiliate they get credit for the orders that the level 2 has.
- How do I configure product specific payouts for each affiliate? I'd like to pay some affiliates more than others for certain products or categories of products.
- How do I display data from Affiliate Manager in the orders exported by Generic Orders Export?
- When a new affiliate signs up I would like to have the notification emails sent to every affiliate in the referral chain. Is this possible?
- 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?
- Making fields on the "New Affiliate Sign-up" page required
- What does the "Associate by zip code?" option do?
- Displaying messages for failed login attempts
- Displaying the referral prompt at checkout
- Displaying the products in affiliate order notification emails














