How to create an Ubercart add to cart button programmatically with defaults? I am able to create an add to cart button:

$nid = 27;
$node = node_load($nid);
$add_to_cart = array( 
    '#theme' =&gt; 'uc_product_add_to_cart',
    '#form' =&gt; drupal_get_form('uc_product_add_to_cart_form_' . $nid, $node) 
);
return drupal_render($add_to_cart);


This gives me an add to cart button, but with no attributes selected. How can I alter this code to allow for the defaults to be set to specific values. For example, if I have an attribute with aid = 1, called "action", and two possible value... oid = 3 = register ... and oid = 4 = transfer..... of which I want the default to be "transfer" for example?
I managed to use cart links instead:

/cart/add/p27_a6osfsdfsdfsdf_a7o706_a2o8_a1o515_q1-idomainName?destination=cart