Index: /mods/wpsg_mod_orderupload.class.php
===================================================================
--- /mods/wpsg_mod_orderupload.class.php	(revision 8294)
+++ /mods/wpsg_mod_orderupload.class.php	(revision 8295)
@@ -87,5 +87,5 @@
 				if (
 					$this->shop->get_option('wpsg_mod_orderupload_optional') != '1' && 
-					sizeof($_SESSION['wpsg']['wpsg_mod_orderupload']) <= 0 &&
+					(!isset($_SESSION['wpsg']['wpsg_mod_orderupload']) || sizeof($_SESSION['wpsg']['wpsg_mod_orderupload']) <= 0) &&
 					(!isset($_FILES['wpsg_mod_orderupload_file']) || !file_exists($_FILES['wpsg_mod_orderupload_file']['tmp_name']))
 					)
Index: /views/mods/mod_orderupload/basket_after.phtml
===================================================================
--- /views/mods/mod_orderupload/basket_after.phtml	(revision 8294)
+++ /views/mods/mod_orderupload/basket_after.phtml	(revision 8295)
@@ -12,5 +12,5 @@
 
     function wpsg_mod_orderupload_upload(product_index, product_id) {
- 
+
         var files = document.getElementById('wpsg_mod_orderupload_' + product_index + '_file').files;
         var formData = new FormData();
@@ -63,5 +63,5 @@
             data: {
                 action: 'wpsg_mod_orderupload_delete',
-                order_id: <?php echo $_SESSION['wpsg']['order_id'] ?>,
+                order_id: '<?php echo $_SESSION['wpsg']['order_id'] ?>',
                 product_index: product_index,
                 product_id: product_id,
