Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2012
    Posts
    4
    Plugin Contributions
    0

    Default 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.

  2. #2
    Join Date
    Feb 2012
    Posts
    4
    Plugin Contributions
    0

    Default 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.

  3. #3
    Join Date
    Jun 2011
    Location
    Washington
    Posts
    3
    Plugin Contributions
    0

    Default 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

  4. #4
    Join Date
    Feb 2012
    Posts
    4
    Plugin Contributions
    0

    Default 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.

  5. #5
    Join Date
    Jun 2011
    Location
    Washington
    Posts
    3
    Plugin Contributions
    0

    Default 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.

  6. #6
    Join Date
    Jun 2011
    Location
    Washington
    Posts
    3
    Plugin Contributions
    0

    Default 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

  7. #7
    Join Date
    Feb 2012
    Posts
    4
    Plugin Contributions
    0

    Default 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/i...hp?article=408

 

 

Similar Threads

  1. v150 download button - text link
    By xr3461 in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 17 Jan 2013, 11:09 AM
  2. My site's 'forum' link is going to an incorrect link
    By tommydamani in forum General Questions
    Replies: 17
    Last Post: 8 Aug 2010, 12:27 PM
  3. Replace the normal digital product download link with a different/external link
    By ballyc27 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 1 Jul 2009, 05:31 PM
  4. No download button or link
    By carlwenrich in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 28 Nov 2008, 04:54 AM
  5. No Download Link - Link Expired in 1970?
    By luckyclover in forum General Questions
    Replies: 1
    Last Post: 15 May 2008, 03:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg