--- ./uc_varprice_old.module 
+++ ./uc_varprice.module 
@@ -177,7 +177,18 @@
 function uc_varprice_add_to_cart_data($form_values) {
   // Store the customer entered price in the product's data array.
   if (!empty($form_values['varprice'])) {
-    return array('varprice' => $form_values['varprice'], 'uniqid' => uniqid());
+    //  Parse every possible user-entered price format and convert to decimal.
+    //  Accept commas as decimal delimiter or thousands separator.
+    $price = preg_replace("/[^0-9.,]+/","",$form_values['varprice']);
+    if (intval($price) > 0) {
+      if(substr($price, -3, 1) == ",") {  // accept comma as decimal delimiter, and convert to period.
+        $price = preg_replace("/[.,]+/", "", $price);
+        $price = substr_replace($price, ".", -2, 0);
+      }
+    }
+    $price = str_replace(",", "", $price);
+
+    return array('varprice' => $price, 'uniqid' => uniqid());
   }
 }
 
