Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

The Die command


the1michaeljones

Recommended Posts

Posted

I am having problems getting the download link on the confirmations page for the sale of downloadable product. I found this command in the download.php file and just wondered exactly what is its function and if it were written correctly and if it could have an effect on whether or not the download link is offered?

 

// Die if file is not there

if (!file_exists(DIR_FS_DOWNLOAD . $downloads['orders_products_filename'])) die;

Posted
That code is saying that if the download file can't be found to stop the code from proceeding.

 

Jack

Thank you, Jack. So are there any specific reasons why the download file might not be found? Could it have any thing to do with the configure.php file download code? I'm stumped, but once again thank you for the reply.

Posted
That code is saying that if the download file can't be found to stop the code from proceeding.

 

Jack

Also is this code here saying that there is no access to the download?This is in the download.htacess file.

AuthType Basic

AuthName "No access"

AuthUserFile .htnopasswd

AuthGroupFile /dev/null

Require valid-user

 

Thanks!

Posted

There are a number of conditions required to be met for the download to work. See in includes/modules/downloads.php where it says

// The link will appear only if:
// - Download remaining count is > 0, AND
// - The file is present in the DOWNLOAD directory, AND EITHER
// - No expiry date is enforced (maxdays == 0), OR
// - The expiry date is not reached

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Posted
There are a number of conditions required to be met for the download to work. See in includes/modules/downloads.php where it says
// The link will appear only if:
// - Download remaining count is > 0, AND
// - The file is present in the DOWNLOAD directory, AND EITHER
// - No expiry date is enforced (maxdays == 0), OR
// - The expiry date is not reached

 

Jack

 

 

 

Hi, I also have been trying to find the answer to this, and have met all the conditions I can find in the forum, but still cannot get the download link to show on a test order. I have also tried the "Super Download" contribution, went through it two times. Plus doing three complete re-installs of OsCommerce. I'm trying to have mp3's available for download. Folder permissions have been set through the host's cpanel. "/" is where it should be after "download" in the proper file. MP3 File names have no spaces in them. What else might be looked for?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...