Ryan, why won't uc_cart_add_item() work in this case?
Same for me, I get a PHP stack overflow and the item is added until I cancel the page.
My code is:
<?php
function role_price_cart_item($op, &$item) { cache_clear_all(); global $user; switch ($op) { case 'load': $nid = $item->nid; $type = db_result(db_query("SELECT type FROM {node} WHERE nid = %d", $nid)); if ($type == 'product_type') { if ($item->data['attributes'][7] == '17') { uc_cart_add_item(320); } } } } ?>