Alex,
First off, thank you soooooooo much for providing this mod, it is perfect for my business needs. However, during my install, I did run into a small problem with it, and I think I found a working solution, and wanted to share it with you in case I'm not the only one with this bug. Here's the details:
In the code for "download.php", we have this...
// Now send the file with header() magic
header("Expires: Mon, 26 Nov 1962 00:00:00 GMT");
header("Last-Modified: " . gmdate("D,d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Content-Type: Application/octet-stream");
// BOF Super Download Shop v1.1 mod
header("Content-disposition: attachment; filename=\"" . $file_name . "\"");
// EOF Super Download Shop v1.1 mod
Unfortunately this would frequently result in bad downloads for me. For example, only 2 to 3 MB of a 10 MB PDF would arrive at download completion, which means a corrupt file of course.
After browsing the internet for other "header" examples, I stumbled upon this:
// Now send the file with header() magic
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public", false);
header("Content-Description: File Transfer");
header("Content-Type: application/pdf");
header("Accept-Ranges: bytes");
header("Content-Disposition: attachment; filename=\"" . $file_name . "\";");
header("Content-Transfer-Encoding: binary");
header("Content-Length: " . filesize(DIR_FS_DOWNLOAD . $downloads['orders_products_filename']));
So far it's been working well, and in addition, there's actually some "total size" info now on the browser's download progress-bar. Please consider whether this code-snippet would benefit your mod, I hope it proves useful. :)