Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / download link button - incorrect link - 404

download link button - incorrect link - 404

Views: 1,108

Results 1 to 7 of 7
19 Feb 2012, 4:31 PM
#1
tortagialla avatar

tortagialla

New Zenner

Join Date:
Feb 2012
Posts:
4
Plugin Contributions:
0

download link button - incorrect link - 404

Hello - I'm hoping someone can point me in the right direction.

I've set up Zen Cart a year ago and was able to get downloadable products working fine.

I'm doing it again on the same server, but come upon an error with the download link itself - this time around.

For some reason, when clicking the download button after checkout or in the account order details, the redirect just doesn't work properly.

I get a 404 because it is trying to go to "pub/..." URL directly.

If I paste in my shop domain name in front of all that, the download works. Am I missing config somewhere?

Can't remember if I did anything differently a year ago...

If someone has an idea of what I should check? Thank you in advance.

20 Feb 2012, 2:35 PM
#2
tortagialla avatar

tortagialla

New Zenner

Join Date:
Feb 2012
Posts:
4
Plugin Contributions:
0

Re: download link button - incorrect link - 404

I think I might have figured it out... apparently when installing Zen Cart on subdomain, there is a doubleslash for the root, in the config files.

Everything seems to work fine though... except downloads...

I changed that in the config and now downloads work.

21 Feb 2012, 4:08 PM
#3
sampotter001 avatar

sampotter001

New Zenner

Join Date:
Jun 2011
Location:
Washington
Posts:
3
Plugin Contributions:
0

Re: download link button - incorrect link - 404

I have experience something very similar. I had the store working perfectly offering downloadable pdf's for sale. I had to reinstall Zen Cart and this time my downloads will not work and time out also.

My store is installed on a sub domain and has the double "//" at the end of the domain name.

In reading other information in posts here I do see mention that changing the config file can help. If this is true, where & how do I make this change? I can see in the inludes/configure.php where items like download have their location defined but not exactly sure how to accommodate the "//"

Thanks

21 Feb 2012, 4:36 PM
#4
tortagialla avatar

tortagialla

New Zenner

Join Date:
Feb 2012
Posts:
4
Plugin Contributions:
0

Re: download link button - incorrect link - 404

You probably want to check these config files:

/includes/configure.php
/zcadmin/includes/configure.php

and of course usually they are marked as read-only, so you have to change permissions to overwrite them properly on your server.

21 Feb 2012, 5:22 PM
#5
sampotter001 avatar

sampotter001

New Zenner

Join Date:
Jun 2011
Location:
Washington
Posts:
3
Plugin Contributions:
0

Re: download link button - incorrect link - 404

Having permission to change my configure.php files now, how do I need to change the code?

I have tried what I thought would work by changing the complete path of "/home1/user1/public_html/domain/" to "/home1/user1/public_html/domain//" (adding the double //) for the define('DIR_FS_CATALOG', but this did not seem to work.

21 Feb 2012, 5:31 PM
#6
sampotter001 avatar

sampotter001

New Zenner

Join Date:
Jun 2011
Location:
Washington
Posts:
3
Plugin Contributions:
0

Re: download link button - incorrect link - 404

Once I tried placing the full path name in front of the pub/ ( define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . '/home1/user1/public_html/domain/pub/'); it worked fine as you mentioned yourself.

Where did you end up changing the code so you did not need to add the full path?

Thanks,
Sam

21 Feb 2012, 5:41 PM
#7
tortagialla avatar

tortagialla

New Zenner

Join Date:
Feb 2012
Posts:
4
Plugin Contributions:
0

Re: download link button - incorrect link - 404

Sorry I'm no expert, but what I did was to not use double-slashes. Basically these two lines:
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');

For some reason, there were double-slashes there instead of one, after my install of zen cart on a subdomain...

I'm not sure how you installed zen cart, but you do have to make sure all the configurations are correct.
This link might help to explain all the stuff in the config files: https://www.zen-cart.com/tutorials/index.php?article=408