How can I check to see if the current user has an an order in checkout? I need to create a condition like the following:

 if (current user has an order in checkout){
    go to the checkout page
 }else{
    go to this other page
 }


So far, I'm using:

 if ($order = commerce_cart_order_load($user-&gt;uid)) {
      drupal_goto('checkout/')
 }else{
      drupal_goto('someotherpage/')
 }


but it doesn't seem to work. What am i doing wrong? Thanks!
Preload $user variable.
Remove those / at the end of each url.
Add a semicolon at the end of each PHP line.

global $user;
if ($order = commerce_cart_order_load($user-&gt;uid)) {
  drupal_goto('checkout');
}
else {
  drupal_goto('someotherpage');
}