--- uc_custom_price.module	2011-02-24 20:09:23.000000000 -0600
+++ uc_custom_price.module.vishun	2011-03-08 19:00:26.000000000 -0600
@@ -58,6 +58,22 @@ function uc_custom_price_nodeapi(&$node,
       break;
 
     case 'view':
+      // check for a custom code
+      $code = db_result(db_query("SELECT custom_code FROM {uc_custom_price} WHERE nid = %d", $node->nid));
+      if (!empty($code) && $code != '$item->price = $item->price;') { // shouldn't run if node has a default setting
+        $price = token_replace_multiple($code, array('node' => $node, 'uc_product_price' => $node));
+        eval($price);
+        $node->sell_price = $item->price;
+   
+        $context['class'][1] = 'sell';
+        $context['field'] = 'sell_price';
+        $node->content['sell_price']['#value'] = theme('uc_product_price', $item->price, $context, array('label' => !$a3));
+   
+        $context['class'][1] = 'display';
+        $context['field'] = 'sell_price';
+        $node->content['display_price']['#value'] = theme('uc_product_price', $item->price, $context);
+      }
+      break;
   }
 }
 
