uc_order_comment_save($order_id, $uid, $message, $type = 'admin', $status = 1, $notify = FALSE)
This function lets you log a comment to an order, either in the order comments section or admin comments section. Order comments are displayed to customers when they come by your site to check their order status. Admin comments are purely for administrative record keeping, so you can log information about a customer or order that you wouldn't want showing up on their screen.
- $order_id - the ID of the order you wish to leave a comment for
- $uid - if applicable, the user ID of the person leaving the comment
- $message - the text message of the comment
- $type - either 'admin' or 'order'; defaults to 'admin'
- $status - the order status ID to display beside the comment; you should use the order's actual status where possible, otherwise retrieve a value using a function like uc_order_state_default(); defaults to 1
- $notify - set to TRUE when the customer has been notified of this comment (setting to TRUE will not actually send a notification); defaults to FALSE
// From a switch in uc_paypal.module:
uc_order_comment_save($order_id, 0, t('A payment has been accepted.'), 'admin');