For those looking to add an upload progress window to the upload mod you can try the following. It seems to work and is simple to install.
Create a new file: progress_upload.php and save in your osCommerce root directory
<html>
<head>
<title><?php echo _("Uploading File...") ?></title>
</head>
<body>
<center>
<span style="font-size:8pt;font-family:arial,helvetica,sans-serif;font-weight:bold;color:#ffffff;background-color:#009900;padding:3px;"><?php echo _(" File upload in progress! ") ?></span>
<p>
<span style="font-size:8pt;font-family:arial,helvetica,sans-serif;">
<?php echo _("This page will go away automatically when the upload is complete. Please be patient!") ?>
<p>
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td> <img src="images/computer.gif"></td>
<td> <img src="images/uploading.gif"></td>
<td> <img src="images/computer.gif"></td>
</tr>
</table>
</center>
</span>
</body>
</html>
Create a new file: uploading.js and save in your osCommerce root directory (usually catalog)
<script type="text/javascript">
<!--
var win = null;
function showProgress() {
win = window.open("progress_upload.php","status",'width=350,height=150,scrollbars=no,statusbar=no,toolbars=no');
}
-->
</script>
Edit catalog/product_info.php
Right before
</head>
Add
<?php require('uploading.js'); ?>
Find
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
Change to
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" onUnLoad="win.close()">
You are adding the onUnload option.
Around line 323
Find:
<?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART,''); ?>
Change to:
<?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART,'onClick="showProgress()"'); ?>
You are adding the onClick option
The graphics used in the box are:
The two image files that I used are from the "Menalto Gallery" project.
Right click and save from here or download the graphics from www.imijit.net/downloads/uploading.gif and www.imijit.net/downloads/computer.gif.
When you start your upload the popup box will appear. When the upload is finished and the product_info page is refreshed the box will close.
This is only tested when you do not show the shopping cart after adding the item. The window should close when the program closes but I have not tested it that way yet.
I hope that someone finds this useful.
Scott