How to retrieve the order id of an order in drupal commerce?
If you're looking for the order ID related to the current cart you can use commerce_cart_order_id():

$order = commerce_order_load(commerce_cart_order_id());


But you shouldn't use it directly in a template file. Use a preprocess hook instead, it's better all round.