Forums / Setting Up Categories, Products, Attributes / Can't get download to work with my file...

Can't get download to work with my file...

Locked

Views: 2,288

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
6 Jan 2008, 11:41 PM
#1
ktnaturals avatar

ktnaturals

Zen Follower

Join Date:
Dec 2006
Location:
Ohio
Posts:
196
Plugin Contributions:
0

Can't get download to work with my file...

I followed the tutorial and set up a download product. I uploaded a file to my download directory and made sure permission was 644. For some reason, it won't recognize the file. I tried it in pdf, zip, and with all sorts of different file names.

When I use sample files already in the download directory (like test.zip, pdf_sample.zip), then it works fine. When I go into Catalog -> Download Manager, my file always comes up with a red dot. If I change it to one of the files that already existed, then it's green. I can even check out and download the actual file.

My pdf file is about 90K (not much different when zipped). What am I doing wrong??:huh: Here's the URL of the product.

http://www.thewahmmall.com/teststore/index.php?main_page=document_product_info&cPath=21&products_id=148

7 Jan 2008, 2:09 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Can't get download to work with my file...

Are you absolutely sure you uploaded it to the right place?
When you uploaded it to the "download" directory, what other files were also in that folder?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Jan 2008, 2:16 AM
#3
ktnaturals avatar

ktnaturals

Zen Follower

Join Date:
Dec 2006
Location:
Ohio
Posts:
196
Plugin Contributions:
0

Re: Can't get download to work with my file...

I have

.htaccess
index.html
ms_word_sample.zip
pdf_sample.zip
test2.zip
test.zip
unreal.zip

.htaccess content

#prevent directory browsing -- for security
IndexIgnore /
AuthType Basic
AuthName "No access"
AuthUserFile .htnopasswd
AuthGroupFile /dev/null
Require valid-user

7 Jan 2008, 2:25 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Can't get download to work with my file...

  1. Is this "download" folder under your public_html folder? Where is it located?

  2. What is your setting in /admin/includes/configure.php for DIR_FS_DOWNLOAD and DIR_FS_CATALOG ?

  3. When you uploaded the file, did you take the EXACT same filename (including upper/lower case etc) when you entered the filename in your admin page for the download attribute of the product?

  4. Are you using any spaces or other characters that are not letters or numbers or underscores or dots in the filename?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Jan 2008, 2:38 AM
#5
ktnaturals avatar

ktnaturals

Zen Follower

Join Date:
Dec 2006
Location:
Ohio
Posts:
196
Plugin Contributions:
0

Re: Can't get download to work with my file...

  1. Is this "download" folder under your public_html folder? Where is it located?
    under public_html

..... OK, I feel reeeaaaally stupid. I'm supposed to be under public_html/teststore/download. I was uploading them to public_html/download. :blush::blush: Sorry for the trouble!!

6 Mar 2008, 5:46 AM
#6
tracib avatar

tracib

Zen Follower

Join Date:
Oct 2007
Posts:
157
Plugin Contributions:
0

Re: Can't get download to work with my file...

DrByte:

  1. Is this "download" folder under your public_html folder? Where is it located?

  2. What is your setting in /admin/includes/configure.php for DIR_FS_DOWNLOAD and DIR_FS_CATALOG ?

  3. When you uploaded the file, did you take the EXACT same filename (including upper/lower case etc) when you entered the filename in your admin page for the download attribute of the product?

  4. Are you using any spaces or other characters that are not letters or numbers or underscores or dots in the filename?
    I am having this problem. I moved my downloads folder above the public folder so the path is /home/tracibu/download

I changed both of my config files to say this:
define('DIR_FS_DOWNLOAD', '/home/tracibu/download/');

my files name is scandiavest.pdf.zip

I have it set up to redirect, and it should work on my server, it's Linux. Any ideas? There are green dots next to all of the test products, but a red dot next to mine. I have the option name/option value set up as download & PDF Pattern, with download as a dropdown.

Any ideas?

Does this need to be changed:
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

6 Mar 2008, 6:48 AM
#7
tracib avatar

tracib

Zen Follower

Join Date:
Oct 2007
Posts:
157
Plugin Contributions:
0

Re: Can't get download to work with my file...

I have been trying more to get this to work. If I use one of the the test files, it will work. BUT, if from my hard drive, I duplicate one of the test files, rename it (like testcopy.zip) and upload it, it won't work. So I am totally confused. I have permissions for the files set to 644. It is obviously finding the folder since I can get the test files to work, although the ones that are .txt won't.

So, I'm doing something wrong, but have no idea what. I don't know why the files that I duplicated and renamed wouldn't work. I am using fetch, and uploading as automatic, but it seems that's not an issue--since I was able to upload the "download" folder to a different location, and could get those files to work.

6 Mar 2008, 7:55 AM
#8
tracib avatar

tracib

Zen Follower

Join Date:
Oct 2007
Posts:
157
Plugin Contributions:
0

Re: Can't get download to work with my file...

I got it!:clap:

Here's the deal: It wasn't finding the downloads folder, and the "original" one was still there. So that's why the test files were working, but not new ones. It wasn't finding the correct folder because I didn't get the admin/includes/config on the right place, I put it in the admin folder. As soon as I did that, it was fine.

Here's a new question, which isn't a big deal. I thought I read that with downloads, it wouldn't decrease the number that was listed as in stock. For me, it is.

8 Apr 2008, 12:26 PM
#9
tednigma avatar

tednigma

New Zenner

Join Date:
Mar 2008
Location:
Canada
Posts:
23
Plugin Contributions:
0

Re: Can't get download to work with my file...

You change that in the product setup page via catalog/products and choose the product. Change the " Product is Virtual: Yes, Skip Shipping Address

to

No, Shipping Address Required

According to the manual that stops the down count of stock.

GL!!

ps. I've yet to get the download side to work. The attributes thing is killing me. I am trying to setup an .exe with no joy.

There is no place like ::1

Individuality dies with freedom. "Nothing to hide." translates to "I am a peg you will accept."

8 Apr 2008, 1:21 PM
#10
tednigma avatar

tednigma

New Zenner

Join Date:
Mar 2008
Location:
Canada
Posts:
23
Plugin Contributions:
0

Re: Can't get download to work with my file...

Not fast enough on the edit. I got it. How? Dunno. I followed the turorial in the manual with no joy, the one here on the board worked fine.

I am thinking I was using exe instead of zip for the attribute, 'cause that is all I changed. Also, the 'zip' attribute does not seem to care that it is an .exe file. Not a big deal i suppose, I mean 'cause the filename on the check out screen says .exe, and it downloads fine.

Anyhoo, the operation was a success, however the surgen is unsure of the proceedure. HA!

There is no place like ::1

Individuality dies with freedom. "Nothing to hide." translates to "I am a peg you will accept."