I have a custom shipping quote module which adds freight costs to the orders admin comments:   

$order_id = intval($_SESSION['cart_order']);
uc_order_comment_save($order_id, 0, t($shippingquote_text), 'admin');

This works correctly when the user goes through the checkout process. 

**Problem:**
How do i find the order id when the admin is manually editing a users order?

eg admin is on admin/store/orders/3845/edit

clicks get shipping quote button - which fires freight quote module

**Want:**
comment is saved to order 3845 w shipping quote details.