Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Download of Items


cjkitts

Recommended Posts

Posted

I have created a dowload directory and I have linked a product item to a dowload image in that directory using the Product Properties area of the Admin Catalog, but the download link itself doesn't appear.

The text appears in the confirmation of the order page, saying that there is a file to download and that there are several downloads left, but there is not hot link to download.

The hot link does not appear in the My Accounts area after I place an order.

Is there something I am missing? How do i get the download link to appear?

Thanks

  • 2 weeks later...
Posted

I have also got this problem. I checked a range of things, from database tables to correct files being in the downloads directory. I guess the next thing is to look at the code to determine what makes it a hot link. It is in Checkout_success.php which calls downloads.php. I have just installed the new downloads contribution.

This is the code worth looking into:

if ( ($downloads['download_count'] > 0) && (file_exists(DIR_FS_DOWNLOAD . $downloads['orders_products_filename'])) && ( ($downloads['download_maxdays'] == 0) || ($download_timestamp > time())) ) {

// WebMakers.com Added: Downloads Controller Show Button

// original MS1 echo ' <td class="main"><a href="' . tep_href_link(FILENAME_DOWNLOAD, 'order=' . $last_order . '&id=' . $downloads['orders_products_download_id']) . '">' . $downloads['products_name'] . '</a></td>' . "\n";

echo ' <td class="main" align="center"><a href="' . tep_href_link(FILENAME_DOWNLOAD, 'order=' . $last_order . '&id=' . $downloads['orders_products_download_id']) . '">' . $downloads['products_name'] . '<br>' . tep_image_button('button_download.gif', '') . '</a></td>' . "\n";

} else {

echo ' <td class="main">' . $downloads['products_name'] . '</td>' . "\n";

}

 

 

I then commented out some code to force the line that displays the button to appear.

I saved this change then created a new order. The link then worked. Next job is to find out why it did not execute. Probable the file_exists piece of code.

I suspect bad data or bad entry of data. Good luck.

Posted

Thank you for taking the time to answer. I really do appreciate it. I will check out what you said and see if this works for me as well.

 

Thanks again

CJ

Posted

I solved my problem by changing this bit of code in Configure.php:

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . '/download/'); //put this extra slash in to make it work - was 'download/'

 

Don't know why I needed to do this, but it gets the downloads to come up. The path was wong. Missing the slash between catalog and download.

 

The next problem was the image file when downloading only took a few bytes and then completed.

 

If someone has experience why a download image gets very much reduced in size I would like to know. Is there a setting to control this?

Posted

Adding the extra / did not assist me. I can get one picture to download the rest of the links are dead. Everythig is the same. The permissions on the photos are the same. So i can see the link when I "order" it but only can download 1 photo I have uplodated into the download directory.

  • 2 weeks later...
Posted

Did you ever find a solution? I have having the same problem.

 

At the end of the checkout process, it says "Download here.." but there is not an actual LINK to DL the product. And when you go to My Account and view the order, it says "Download here...." but again, the link to DL is not there, but it DOES show the item that was suppose to be downloaded.

 

 

Thanks

Posted

No I still haven't found a solution.

What is strange is that if I place the downloadable items in a directory called

catalogdownload (all one word) the LINK appears and they are working.

However the download process does something to the downloadable item.

 

The item says it is not a recogonizable format, even thought I can open it prior to uploading it.

 

It is a bit a a frustrating process.

 

I place the downloadable items in the download directory on my file server.

If a place the items and hook them up via the product attributes process, the link appears, but it is not hot.

 

IF i cannot find a solution to this soon, I will not be able to use this cool catalog software.

Archived

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

×
×
  • Create New...