Jump to content

Valdamir

Members
  • Content count

    4
  • Joined

  • Last visited

Profile Information

  • Real Name
    Amcor Enterprises
  1. Valdamir

    [contribution] Super Download Store

    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. :)
  2. Valdamir

    problem with zip files

    Hi Karin, I was encountering a similar problem until just recently. My test downloads would end up 2 to 3 MB large, instead of the 10 MB they should have been. This naturally gave me "corrupt file" messages when I tried to open them. The answer was to tweak its download function in a couple areas. So my first question is, do your test downloads have the correct filesize? Also, do you have the "Download by Redirect" feature enabled or not? Regarding Gzip... it's a compression that "zips" your regular cart pages and "unzips" them on the client's side. A smaller zipped page means a more quickly-transmitted page. Unfortunately, GZip does not work well with downloads; it simply was not designed for that purpose, and can result in download errors / blanks. And it's easily fixed: In the "Super Download Shop's" install instructions, look under the last menu item "known issues", and follow the instructions there. It's a very short and simple workaround. Or you could just turn off Gzip if you find it's not significantly faster (I suggest you experiment with its settings sometime, it could only help). So give the GZip change a go, for it could be the source of your problem. And if that still doesn't work, please answer those two earlier questions and we'll help best we can for your situation. :)
  3. Valdamir

    Error 1146 and sql Error 1060

    In response to this error, I think I have the solution... that message usually comes up when one of the two "database_tables.php" files were not edited & uploaded properly. If you are experiencing this error, make sure you edit BOTH the "catalog/includes/database_tables.php" and the "catalog/admin/includes/database_tables.php" according to the instructions. Chances are you did one but overlooked the other. I would know... I spent four hours today tearing my hair out to solve this. Turns out I just missed a line in the instructions. B) Hope this helps! :)
×