Miva Merchant 4 Module FAQs » Generic Order Export (BROK_GENEXPORT)


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

Print this record Send to a friend Show this as PDF file
Please rate this entry:

Average rating: 0 out of 5 (0 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry