function uc_order_comment_save in Ubercart 7.3
Same name and namespace in other branches
- 8.4 uc_order/uc_order.module \uc_order_comment_save()
- 5 uc_order/uc_order.module \uc_order_comment_save()
- 6.2 uc_order/uc_order.module \uc_order_comment_save()
Inserts a comment, $type being either 'order' or 'admin'.
27 calls to uc_order_comment_save()
- test_gateway_charge in payment/
uc_credit/ tests/ test_gateway.module - Callback function to perform the charge operation.
- UbercartOrderTestCase::ucCreateOrder in uc_order/
tests/ uc_order.test - Helper function for creating an order programmatically.
- uc_2checkout_complete in payment/
uc_2checkout/ uc_2checkout.pages.inc - Finalizes 2Checkout transaction.
- uc_2checkout_process_notification in payment/
uc_2checkout/ uc_2checkout.pages.inc - React on status changes from 2CO.
- uc_authorizenet_arb_update in payment/
uc_authorizenet/ uc_authorizenet.module - Updates an ARB subscription; for simplicity's sake, payment schedule information cannot be updated at this time.
File
- uc_order/
uc_order.module, line 1359
Code
function uc_order_comment_save($order_id, $uid, $message, $type = 'admin', $status = 'pending', $notify = FALSE) {
if ($type == 'admin') {
db_insert('uc_order_admin_comments')
->fields(array(
'order_id' => $order_id,
'uid' => $uid,
'message' => $message,
'created' => REQUEST_TIME,
))
->execute();
}
elseif ($type == 'order') {
db_insert('uc_order_comments')
->fields(array(
'order_id' => $order_id,
'uid' => $uid,
'message' => $message,
'order_status' => $status,
'notified' => $notify ? 1 : 0,
'created' => REQUEST_TIME,
))
->execute();
}
}