I am able to create an add to cart button:
$nid = 27;
$node = node_load($nid);
$add_to_cart = array(
'#theme' => 'uc_product_add_to_cart',
'#form' => 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?