Miva Merchant 4 Module FAQs » Generic Order Export (BROK_GENEXPORT)
These fields permit very sophisticated filtering of the export.
The text in the fields (if any) are the actual filter used to filter the orders and orderitems (respectively) databases. If they are left empty, no filtering will be done.
So you can enter a filter statement into these fields that will limit the orders exported. The filter statements take tokens to represent the various order and item data; the same tokesn used to display those fields in the templates.
For example, to filter the order data for a particular order id you could use the filter:
('1000' IN %orderid%)
This will export ONLY order id 1000.
Note that the value to be searched for has to be in single quotes and the whole thing should be enclosed in parentheses). Another example, to search for a range of orders:
((%orderid% LT '1020') AND (%orderid% GT '1000'))
will result in all orders with id less than 1020 and greater than 1000 being export. The comparison operators are those available in standard Miva script (You can go here: http://www.miva.com/docs/ScriptMan_html/04-Operators.html#468771 for more details):
GT greater than
LT less than
EQ equal to
NE not equal to
GE greater than or equal to
LE less than or equal to
Filters can also contain the logical operators:
NOT
AND
OR
As well as the string operators:
$
IN/CIN
EIN/ECIN
SUBSTR
{docurl}
"order filter" and "item filter" Field Uses
What are the "order filter" and "item filter" fields used for?
These fields permit very sophisticated filtering of the export.
The text in the fields (if any) are the actual filter used to filter the orders and orderitems (respectively) databases. If they are left empty, no filtering will be done.
So you can enter a filter statement into these fields that will limit the orders exported. The filter statements take tokens to represent the various order and item data; the same tokesn used to display those fields in the templates.
For example, to filter the order data for a particular order id you could use the filter:
('1000' IN %orderid%)
This will export ONLY order id 1000.
Note that the value to be searched for has to be in single quotes and the whole thing should be enclosed in parentheses). Another example, to search for a range of orders:
((%orderid% LT '1020') AND (%orderid% GT '1000'))
will result in all orders with id less than 1020 and greater than 1000 being export. The comparison operators are those available in standard Miva script (You can go here: http://www.miva.com/docs/ScriptMan_html/04-Operators.html#468771 for more details):
GT greater than
LT less than
EQ equal to
NE not equal to
GE greater than or equal to
LE less than or equal to
Filters can also contain the logical operators:
NOT
AND
OR
As well as the string operators:
$
IN/CIN
EIN/ECIN
SUBSTR
Last update: 2003-07-30 01:05
Author: Support
Revision: 1.0
You cannot comment on this entry
Records in this category
- "order filter" and "item filter" Field Uses
- Using "Order Filter" to Limit the Export to a Particular Shipping Method
- What tokens can I use to export data about coupons, gift certificates, and other "charges"?
- The program I want to import the data into requires that I have some text at the end of the exported file for each order (i.e. after the products). How can I do that?
- Is there any way to remove characters like hard-returns and quotation marks from the exported data?
- I would like to base the exported file name on the date or the batch name. Can I do this?
- Can I export line breaks and carriage returns into the file?
- I would like, filter by date. Is this possible?














