I'm a module developer and I want to be able to update the order status by calling a function in your module. Is there a function for that?
(2004/10/01)here is now. The current version has two functions:
UpdateOrderStatus(OrderId,StatusType,TrackingType,TrackingNumber,field1,field2,field3,note1,note2,override,sendmail)
UpdateItemStatus(LineId,StatusType)
which can be MvDONE to update the order and order item status (and other information).
In the function UpdateOrderStatus:
The variables field1, field2, and field3 correspond with the "additional data fields" offered by the module (field1 and field2 are boolean, 1 or 0, field3 is a text field with maximum length of 40). Note1 corresponds to the "customer note", note2 with the "in-house" note. All 5 fields are option (but must be included in the function call w/ empty single quotes, '', if not used).
If the "override" option is set to 1 (or anything but 0 or '') all of the order's (or items) data will be overwritten by the imported values regardless of whether or not there is anything in the field. If it is set to 0 (or anything that evalutes to 0) then the data will be overwritten ONLY if the value in the field has a length.
If sendmail is empty, '', then no status notification email is sent. If it is set to -1, the email is sent only if hte status changed. If it is set to 1, the email is sent regardless of whether or not the status changed.
In the UpdateItemStatus function:
Similar to the UpdateOrderStatus function, the parameters are:
orderid: the order id "at issue"
lineid: the lineid of the item (corresponding to Merchant's "line_id" field)
newstatus: the new status assigned to the item
trackingtype: the "tracking type" assigned to the item
trackingnumber: the "tracking number" assigned to the item
override: if set to 1 then even if the other fields are set to 0 or null, they will be used as the new value. Otherwise
a null value for any field will cause that field to NOT be updated.
In either function, if StatusType is not found in the StatusTypes database it is added. Similarly, if the TrackingType is not found in the TrackingTypes database, it is added (albeit with no tracking url).
There are certain "conditions" that the module expects to be "set".
-it expects the Stores database to be open and pointing to the current store.
-it expects the variables g.Module_Library_DB to be defined and correctly point to the db.mv(c) file
-it expects the variable g.Module_Root to be defined
-in 4.x stores it expects the variable g.Module_Feature_CUS_DB to be set to the cus_db.db file
Last update: 2004-12-09 13:23
Author: Support
Revision: 1.0
You cannot comment on this entry
Most Recent FAQ Entries: 
- Alternate ways to display the product and attribute data ... (2008-09-02 18:40)
- Adding both "Add All to Basket" and "Add to ... (2008-09-01 09:46)
- When adding a product to the basket from an ... (2008-08-27 19:02)
- I have the module configured to add the key ... (2008-08-13 14:50)
- What is the format for the htaccess file if ... (2008-08-12 14:50)
Top 10 
- 2921 views:
Adding Tokens to Evaluate Expressions - 2852 views:
Is there a way to "Limit" the number of ... - 2775 views:
Why won't you call me for technical support? I ... - 2665 views:
Are license keys valid for more than one store? ... - 2566 views:
I'm trying to enter a license key and get ... - 2555 views:
How do I install a module? - 2397 views:
How do I check for a module upgrade? - 2363 views:
How can display and change the parameters of an ... - 2210 views:
The total on my checkout pages are not correct. ... - 2011 views:
I have select and radio type attributes in my ...
















