Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Download link does not work


Guest

Recommended Posts

Hi there

 

I have a store with e-books that need to be downloaded after payment. I have it setup with paypal and it works fine untill it redirects the user back to osc after payment has gone through. There, there is a download link but when you click on it, it leads to a blank page, not the zipped file it is supposed to lead to.

 

I have the attributes set up with the file name of the file that is sitting in the download folder. I have made sure that pub is CHMOD 777 and download is CHMOD 755. I've been searching this forum and the knowledgebase for a few days trying to find a solution, but nothing so far. I am having to email the files to customers and the whole point of using oscommerce was to have it automated....

 

The download link leads to a page myurl.com/marketplace/download.php/order/4/id/pub/.tibhwpijzpnkvcstcqzs/TEST_Product.zip

 

and nothing comes up....

 

Anyone else have this issue and resolved it. Please help. Thanks in advance :)

Link to comment
Share on other sites

In download.php find each occurence of:

 

die;

 

and put an echo statement before it:

 

echo 'Error 1';

 

You will need to also put brackets in for the If clause in which it appears e.g:

 

Change:

 

if ((isset($HTTP_GET_VARS['order']) && !is_numeric($HTTP_GET_VARS['order'])) || (isset($HTTP_GET_VARS['id']) && !is_numeric($HTTP_GET_VARS['id'])) ) die;

 

To:

 

if ((isset($HTTP_GET_VARS['order']) && !is_numeric($HTTP_GET_VARS['order'])) || (isset($HTTP_GET_VARS['id']) && !is_numeric($HTTP_GET_VARS['id'])) ) 
{
 echo 'Error 1';
 die;
}

 

Obviously change the error number for each occurence of die.

 

When you have done this try a new download and see which Error number comes up - then look at the If clause relevant to that error number to see what is creating the die command to be executed.

Your online success is Paramount.

Link to comment
Share on other sites

  • 2 weeks later...

yesudo,

 

Was encountering the same problem. I followed your suggestion to a "T" but am still getting the following error:

 

The requested URL /catalog/pub/.ywgbtsvhzvmpzoeovjkn/alexus_10ready was not found on this server.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

with "alexus_10ready" being the file that needs to be downloaded.

 

Any thoughts?

Michael Sinclair

Link to comment
Share on other sites

yesudo,

 

Was encountering the same problem. I followed your suggestion to a "T" but am still getting the following error:

 

The requested URL /catalog/pub/.ywgbtsvhzvmpzoeovjkn/alexus_10ready was not found on this server.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

with "alexus_10ready" being the file that needs to be downloaded.

 

Any thoughts?

 

I am experiencing this same problem. I have looked all throughout the forums. I have a default install with the default database and am trying to download unreal tourney to make sure it works. I got a "no input specified" when I click on the link. I have set my configure.php with these suggested settings:

 

define('DIR_FS_DOWNLOAD', '/download/');
define('DIR_FS_DOWNLOAD_PUBLIC', '/pub/');

 

to no avail. No difference. I have enabled downloads in the admin panel and tried redirect on and redirect off (my remote server is unix). I chmodded the pub and download directories to 777 along with all the files in them. The link shows up so the product attribute is set properly.

 

what... is... the deal??

Link to comment
Share on other sites

Was anyone able to find a solution for this yet?

 

Elaine

"There are only 10 types of people in this world: those who understand binary, and those who don't. "

Link to comment
Share on other sites

Was anyone able to find a solution for this yet?

 

Elaine

 

After working on this issue for about 40 hours, here's what I came up with:

 

I reinstalled OS Commerce from scratch, then installed BTS 1.5d for templating and my payment contribution. So pretty much a base install. I went put unreal tournament (from the default products) in my cart as download only, and it skipped shipping. I put it in my cart as box and it showed shipping.

 

But here's the big zinger: I put a filename under the attribute for unreal tournament box edition and guess what? No shipping screen! What does this mean? Somehow the virtual product function is not working properly, either in oscommerce, bts, or both. It is supposed to offer shipping when there's a file name AND a weight. But it doesn't; it just treats it like a zero-weight download file.

 

So I found a solution. I offered our products as download only with no weight and a file name, and then offered a separate product: the "documentation and media pack." This has a weight and no file name, and therefore brings up shipping, whether by itself or in addition to the download product. You may want to put something in the media pack product description: "NOTE: This product will not be shipped without an accompanying purchase of ___."

 

I wanted to have a product attribute that let you select download-only version or download+box version. I installed a contribution that added weight for certain attributes (box/download). But of course my problem boiled down to the virtual product function ignoring the weight all together when there is a file name. The solution I ended up with feels like a workaround to me, but ultimately I think it's just as viable as the way I wanted to do it.

 

Please reply if you found this solution helpful; I spent a LOT of time to get to that point. My forehead is flat from pounding it on the desk so many times. :)

Link to comment
Share on other sites

  • 1 year later...
After working on this issue for about 40 hours, here's what I came up with:

 

I reinstalled OS Commerce from scratch, then installed BTS 1.5d for templating and my payment contribution. So pretty much a base install. I went put unreal tournament (from the default products) in my cart as download only, and it skipped shipping. I put it in my cart as box and it showed shipping.

 

But here's the big zinger: I put a filename under the attribute for unreal tournament box edition and guess what? No shipping screen! What does this mean? Somehow the virtual product function is not working properly, either in oscommerce, bts, or both. It is supposed to offer shipping when there's a file name AND a weight. But it doesn't; it just treats it like a zero-weight download file.

 

So I found a solution. I offered our products as download only with no weight and a file name, and then offered a separate product: the "documentation and media pack." This has a weight and no file name, and therefore brings up shipping, whether by itself or in addition to the download product. You may want to put something in the media pack product description: "NOTE: This product will not be shipped without an accompanying purchase of ___."

 

I wanted to have a product attribute that let you select download-only version or download+box version. I installed a contribution that added weight for certain attributes (box/download). But of course my problem boiled down to the virtual product function ignoring the weight all together when there is a file name. The solution I ended up with feels like a workaround to me, but ultimately I think it's just as viable as the way I wanted to do it.

 

Please reply if you found this solution helpful; I spent a LOT of time to get to that point. My forehead is flat from pounding it on the desk so many times. :)

 

 

I figured out that adding TWO attributes to the product allowed BOTH a download and weight to be counted. 2nd attribute just did not have a download file and all other numbers removed.

 

Claire

Link to comment
Share on other sites

After working on this issue for about 40 hours, here's what I came up with:

 

I reinstalled OS Commerce from scratch, then installed BTS 1.5d for templating and my payment contribution. So pretty much a base install. I went put unreal tournament (from the default products) in my cart as download only, and it skipped shipping. I put it in my cart as box and it showed shipping.

 

But here's the big zinger: I put a filename under the attribute for unreal tournament box edition and guess what? No shipping screen! What does this mean? Somehow the virtual product function is not working properly, either in oscommerce, bts, or both. It is supposed to offer shipping when there's a file name AND a weight. But it doesn't; it just treats it like a zero-weight download file.

 

So I found a solution. I offered our products as download only with no weight and a file name, and then offered a separate product: the "documentation and media pack." This has a weight and no file name, and therefore brings up shipping, whether by itself or in addition to the download product. You may want to put something in the media pack product description: "NOTE: This product will not be shipped without an accompanying purchase of ___."

 

I wanted to have a product attribute that let you select download-only version or download+box version. I installed a contribution that added weight for certain attributes (box/download). But of course my problem boiled down to the virtual product function ignoring the weight all together when there is a file name. The solution I ended up with feels like a workaround to me, but ultimately I think it's just as viable as the way I wanted to do it.

 

Please reply if you found this solution helpful; I spent a LOT of time to get to that point. My forehead is flat from pounding it on the desk so many times. :)

 

 

I figured out that adding TWO attributes to the product allowed BOTH a download and weight to be counted. 2nd attribute just did not have a download file and all other numbers removed.

 

Claire

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...