I'm hoping someone here can help me with this. I'm trying to adapt the seller module to use a unique multiplier per product. I've found the relevant code segment here (in uc_userpoints_seller.module):

function uc_userpoints_seller_award_points(&$order, $settings) {
  if (is_array($order->products)) {
    foreach ($order->products as $product) {
			$product_info = db_fetch_object(db_query("select n.uid from {node} n, {uc_products} p where n.vid = p.vid and p.model =  '%s'", $product->model));
			$total = (intval($product->qty) * intval($product->price));
			$multiplier = variable_get(UC_USERPOINTS_SELLER_EARN, 0);
		  $points = intval(($total * $multiplier));

What I've done is created a CCK decimal field called field_cr. I'd like to replace the multiplier value with the contents of that field. What I'm having trouble with is that it doesn't appear to be loaded as part of the query at the start of this iteration.

I'm very new to php/drupal so I've tried a couple things with no luck. Ideally, I'd like to change this function to lode the cck field 'field_cr' in place of the 'UC_USERPOINTS_SELLER_EARN' value.

Can anyone help me figure out the best way to do this?