What tokens can I use to export data about coupons, gift certificates, and other "charges"?
Q (2004/10/04): What tokens can I use to export data about coupons, gift certificates, and other "charges"?
A: You can access these "charges" by using the tokens:
%order_chargedescription#%: the desription of the charge as saved by that module
%order_chargeamount#%: the raw amount of the charge
where # is a number. Number 1 will be the first charge stored by Merchant; 2 will be the second, etc. If there is no charge corresponding with a number, nothing will be export.
In addition, there is a conditional token:
%begin_if_ordercharge|#|%
....
%end_if%
will display it's contents only if there is an order charge #.
So, to add coupon data (for example) to your export and you typically have only 1 charge (eg. you have the Coupon module installed), then you could add a "column" to your exported information. For example, in the "Merchant Flat File Default" template (which is the format used by Merchant's own "order export to flat file" module) you could add a field to the header:
ORDER_ID|PROCESSED|ORDER_DATE|ORDER_TIME|ORDER_ID|PROCESSED|ORDER_DATE|ORDER_TIME|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_FAX|BILL_ADDR|BILL_CITY|
BILL_STATE|BILL_ZIP|BILL_CNTRY|PROD_CODE|PROD_NAME|PROD_UPSLD|PROD_PRICE|PROD_QUANT|PROD_ATTR|
PROD_OPT|OPT_PRICE|ORDER_TAX|ORDER_SHIP|ORDER_TOTL|CHARGE_DESC|CHARGE_AMOUNT
and then add it to the "order area":
%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%|%charge_description1%|%charge_amount1%
You should probably also add some "dummy" columns to the "product area" so that there are the same number of columns:
%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%||
and the "attributes area" for the same reason:
%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%||
Last update: 2006-02-13 20:59
Author: Support
Revision: 1.0
You cannot comment on this entry
Most Recent FAQ Entries: 
- I have the UPS Custom Integration configured so that ... (2008-07-11 10:21)
- I would like to conditionally display something for a ... (2008-07-03 17:37)
- Is there any way to configure specific global headers ... (2008-06-02 18:28)
- I pay my affiliates with gift certificates from your ... (2008-05-29 10:42)
- Is there any way to add a negative number ... (2008-05-22 13:51)
Top 10 
- 2528 views:
Adding Tokens to Evaluate Expressions - 2515 views:
Why won't you call me for technical support? I ... - 2496 views:
Is there a way to "Limit" the number of ... - 2405 views:
Are license keys valid for more than one store? ... - 2313 views:
I'm trying to enter a license key and get ... - 2276 views:
How do I install a module? - 2137 views:
How do I check for a module upgrade? - 2135 views:
How can display and change the parameters of an ... - 1964 views:
The total on my checkout pages are not correct. ... - 1846 views:
I have select and radio type attributes in my ...
















