trying to dynamically change drupal commerce order
Going out on a limb a bit...

There's no function called commerce_new_order, you probably mean commerce_order_new()

Same thing with commerce_load_product() and commerce_product_load()