Guest Posted October 21, 2005 Posted October 21, 2005 I recently just read through the help documentation on the osCommerce website, but I'm still a bit confused. I uploaded a .zip to my public_html/store/pkg/catalog/download folder. Now, when I go to the Product Attributes section in Admin, I don't know what to enter for Filename, or how to make it into a link so that when someone is done paying, they can download the file. Any help would be appreciated, thanks.
Guest Posted October 21, 2005 Posted October 21, 2005 I am still having no luck after trying multiple different things. When a customer pays for their order, the final page says download here: and the product is listed below. However, the file isn't a link, it's just text. Any ideas guys?
Mediajuggle Posted October 21, 2005 Posted October 21, 2005 I don't know what to enter for Filename, or how to make it into a link so that when someone is done paying, they can download the file. 1. the filename would be the name of the zipped file. ie: downloads.zip 2. Once you've added the filename and create your attributes, it will be linked 3. You should try installing the Download Controller as it will make your life easier. http://www.oscommerce.com/community/contri...load+controller My Contribution Music Download Store Template http://www.oscommerce.com/community/contributions,4275
Guest Posted October 21, 2005 Posted October 21, 2005 Well, first off, I named my file what it's called in the pkg/catalog/download folder, but still no link. As for the download controller, I uploaded and replaced all of the files, yet nothing changes. I feel really stupid lol, but I can't get this thing to work!!! Thanks for the help anyways.
Butch_US Posted October 21, 2005 Posted October 21, 2005 This is what I've found in here: catalog / download.php I added: header("Content-type: application/x-zip-compressed"); header("Content-type: application/zip-compressed"); header("Content-type: application/x-zip"); header("Content-type: application/zip"); and I changed / added this. // We could also loop with fread($fp, 4096) to save memory // readfile(DIR_FS_DOWNLOAD . $downloads['orders_products_filename']); $chunksize = 32 * 1024; $buffer = ''; $handle = fopen(DIR_FS_DOWNLOAD . $downloads['orders_products_filename'], 'rb'); if ($handle === false) { echo 'ERROR...'; die; } while (!feof($handle)) { $buffer = fread($handle, $chunksize); echo $buffer; } fclose($handle); } ?> ######################################### In PHP.ini I changed this three conditions: max_execution_time = 30 changed to 60 max_input_time = 60 changed to 120 upload_max_filesize = 2M changed to 16 M ######################################### And if you have all of your osC admin behind https and you try to download a backup of your database you'd have had the same problem, for the same reason. In admin/backup.php, fine this code: header('Content-type: application/x-octet-stream'); header('Content-disposition: attachment; filename=' . $backup_file); and put this line inbetween them: header("Pragma: "); ######################################### administration / configuration Gzip Compression has to be turned off ( in my case ) ######################################### catalog / administration / product-attributes have to be set properly ######################################### catalog / download / filename.zip should contain the file to be downloaded ######################################### this works in my case up to 35 MB zip files ( maybe more?, I don't need it ) important: Gzip Compression has to be turned of this works but there is a little corporal defect. (see my next posting about this problem ) RTC Butch
kandah Posted October 22, 2005 Posted October 22, 2005 Thanks buths you are a hero. But where is the php.ini file? Do I have to tell my host to change the settings in this file?
Butch_US Posted October 22, 2005 Posted October 22, 2005 Thanks buths you are a hero. But where is the php.ini file? Do I have to tell my host to change the settings in this file? Hi Kandah, Hi, thank you for the the hero, but I'm not, all my knowing comes out here, it takes just time to search and read all the postings of the members. In case of the php.ini, on my server I have access to the php.ini and can change everything I like to, but I'm not sure if you have to do these changes, I just made them on my way to resolve this download problem and it seems to me as if there is a little logic in it, but maybe it isn't necessary. RTC Butch of Berlin
harryedwards Posted October 28, 2005 Posted October 28, 2005 I've been trying to get the download feature working. From the start I noticed that the system seemed to point to a different category other than catalog/download. The error message I received in my store clued me into the fact that I needed to create a directory named "catalogdownload" on the same level as the "catalog." So after many trials and errors, the error message disappeared. Now my problem is this. I tried to do a test purchase and this is what I get: Not Found The requested URL //catalog/pub/.vhdlowethwwpfw/10_15_05.zip was not found on this server. Apache/2.0.46 (Red Hat) Server at www.apologetics.com Port 80 -- What does that mean? How do I fix this?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.