Miva Merchant 4 Module FAQs » Order Status (BROK_ORDERSTATUS)


{docurl}

I'd like to display the Order Status data in the notification email and/or on the invoice page. Is this possible?

(2004/07/29)There are two ways to go about it:

1) To display a field from the StatusOrders database: if you're using the OpenUI notification email, add %OUI% as the first 5 characters of the "message" field and then to display the data field:

%VAR(StatusOrders.d.field)%

So to display the note field:

%VAR(StatusOrders.d.note)%

2) The module now provides for displaying it's data with OpenUI (and template) third party tokens. You can register it with the OpenUI on the "OpenUI Tokens" tab and with the various template modules (most notably the Other Page Templates module which includes templates for the Invoice screen) on the "Third party tokens" tab.

After registering the module, you can use a %module token to display the Order Status Manager tokens. The tokens available are the same as those usable in the Order Status Manager's "status email". Assuming that you register the module with the token BROK_ORDERSTATUS (also the module's code), the token to use for the OpenUI would be:

%module|BROK_ORDERSTATUS|token:the_token:the_orderid%

and for the Other Page Templates module (has an extra | at the end):

%module|BROK_ORDERSTATUS|token:the_token:the_orderid|%

The "the_token" is the token that you want to use without the % at the beginning and end. And 'the_orderid' is the order id of the order you want the information for. If you leave this field out (and do NOT include the ending :) then the id of the current order will be used. So, for example, to display the note collected during checkout (which you would display with %note% in the module's own email) you would use the token:

%module|BROK_ORDERSTATUS|token:note%

NOTE: because the Order Status Manager records the order details at the same time in the process as the Notificaton Email modules send their email, whether or not the Order Status Manager already has a record of the order data when the email is generated will depend on the order in which the modules are processed. In most cases, unfortunately, the notification module will their email before the Order Status Manager has recorded the order (so no information will be included in teh email) because Merchatn processes the earlier instaleld modules first. The order can be changed with variouis third party modules, including one distributed by Copernicus for use with their modules.



Last update: 2004-12-09 13:25
Author: Support
Revision: 1.0

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

Average rating: 5 out of 5 (1 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry

Records in this category