Jump to content



Photo
* * * * * 3 votes

TO HELP THOSE WITH DOWNLOAD PROBLEMS


This topic has been archived. This means that you cannot reply to this topic.
88 replies to this topic

#1   Cyber2000

Cyber2000
  • Members
  • 31 posts

Posted 12 November 2005 - 12:58

Ok guys,

whilst looking on here for help in other areas, i still see that some are having problems in being able to get the downloads to work. Soo herre is the info for you thanks to my research on here and those that posted them in the first place:

Have you downloads activated??

If not you have to do this via the admin panel. In the 'Configuration' panel click 'Download'. Once you have that done click 'Enable download' and set it to 'true'.

You then have associate the sownloadable file to the product so you have to go into the 'Catalog' menu and click the 'Product Attributes' link. When you get to this page you will see three options 'Product Options', 'Option Values' and 'Products Attributes'. In the 'Product Options' menu enter a new option name called 'Download'. Once you have that entered go over to the 'Option Values' and enter in 'Yes' for the 'Download' option. Once you have all that done now you can go to the 'Product Attributes' panel and select your pruduct. Set the 'Option Value' for 'Download' and set the 'Option Value' to 'Yes'. Directly below the 'Option Name' there is a text window called 'Filename:'. Here you have to enter the name of the file thats associated with your product. Then just enter the expiry times etc and bobs your uncle.

Of course all this is useless if you do not have your product uploaded to the correct directory. The default directory is called 'download' but since you are selling a digital product I would reccommend that you change the name of the folder as this is the first place any hacker would look to get your stuff for free. If you do decide to change the name of the folder you will also have to change the name in 'includes/configure.php' to reflect the changes you made to the download folder.

no once you have done this the downloads will automatically be available upon a credit card payment. So, test cards will still allow them to steal the download for free. To ensure that the customer can only download once you have physically been paid add the foolowing code:

If you have the default osc catalog\download.php file try changing first sql query to this:
CODE

// Check that order_id, customer_id and filename match
$downloads_query = tep_db_query("select date_format(o.date_purchased, '%Y-%m-%d') as date_purchased_day, opd.download_maxdays, opd.download_count, opd.download_maxdays, opd.orders_products_filename from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " opd where o.customers_id = '" . $customer_id . "' and o.orders_id = '" . (int)$HTTP_GET_VARS['order'] . "' and o.order_status = '3' and o.orders_id = op.orders_id and op.orders_products_id = opd.orders_products_id and opd.orders_products_download_id = '" . (int)$HTTP_GET_VARS['id'] . "' and opd.orders_products_filename != ''");


This code should only allow the d/l if the order is set to delivered. so in admin control panel, if you click on the customer orders and then set the order from pending to delivered, the customer ONLY then will be allowed to click the link and download their order.

This STOPS ALL customer from sttealing your downloads by using the test credit card number (which I wont display even you know it as it is not fair).

Hope you get it and it works as I am using it and it works great.


Thanks


RJ

#2   lolo25

lolo25
  • Members
  • 1 posts

Posted 21 September 2006 - 09:54

[quote name='Cyber2000' date='Nov 12 2005, 02:58 PM' post='739155']
Ok guys,

whilst looking on here for help in other areas, i still see that some are having problems in being able to get the downloads to work. Soo herre is the info for you thanks to my research on here and those that posted them in the first place:

Have you downloads activated??

If not you have to do this via the admin panel. In the 'Configuration' panel click 'Download'. Once you have that done click 'Enable download' and set it to 'true'.

You then have associate the sownloadable file to the product so you have to go into the 'Catalog' menu and click the 'Product Attributes' link. When you get to this page you will see three options 'Product Options', 'Option Values' and 'Products Attributes'. In the 'Product Options' menu enter a new option name called 'Download'. Once you have that entered go over to the 'Option Values' and enter in 'Yes' for the 'Download' option. Once you have all that done now you can go to the 'Product Attributes' panel and select your pruduct. Set the 'Option Value' for 'Download' and set the 'Option Value' to 'Yes'. Directly below the 'Option Name' there is a text window called 'Filename:'. Here you have to enter the name of the file thats associated with your product. Then just enter the expiry times etc and bobs your uncle.

Of course all this is useless if you do not have your product uploaded to the correct directory. The default directory is called 'download' but since you are selling a digital product I would reccommend that you change the name of the folder as this is the first place any hacker would look to get your stuff for free. If you do decide to change the name of the folder you will also have to change the name in 'includes/configure.php' to reflect the changes you made to the download folder.

no once you have done this the downloads will automatically be available upon a credit card payment. So, test cards will still allow them to steal the download for free. To ensure that the customer can only download once you have physically been paid add the foolowing code:

If you have the default osc catalog\download.php file try changing first sql query to this:
CODE

// Check that order_id, customer_id and filename match
$downloads_query = tep_db_query("select date_format(o.date_purchased, '%Y-%m-%d') as date_purchased_day, opd.download_maxdays, opd.download_count, opd.download_maxdays, opd.orders_products_filename from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " opd where o.customers_id = '" . $customer_id . "' and o.orders_id = '" . (int)$HTTP_GET_VARS['order'] . "' and o.order_status = '3' and o.orders_id = op.orders_id and op.orders_products_id = opd.orders_products_id and opd.orders_products_download_id = '" . (int)$HTTP_GET_VARS['id'] . "' and opd.orders_products_filename != ''");
This code should only allow the d/l if the order is set to delivered. so in admin control panel, if you click on the customer orders and then set the order from pending to delivered, the customer ONLY then will be allowed to click the link and download their order.

This STOPS ALL customer from sttealing your downloads by using the test credit card number (which I wont display even you know it as it is not fair).

Hope you get it and it works as I am using it and it works great.
Thanks



------

hi

thx for helping.

but the code in download.php doesnot work, why?

thx

#3   TechieTW

TechieTW
  • Members
  • 95 posts

Posted 26 September 2006 - 03:28

/thumbsup.gif' class='bbc_emoticon' alt=':thumbsup:' /> Thanks for the help! Your advice has helped me. I also enabled the auto return feature in my paypal profile. Everything works fine except when I click on the link to download. When I do I get this:

Quote:

1054 - Unknown column 'o.order_status' in 'where clause'

select date_format(o.date_purchased, '%Y-%m-%d') as date_purchased_day, opd.download_maxdays, opd.download_count, opd.download_maxdays, opd.orders_products_filename from orders o, orders_products op, orders_products_download opd where o.customers_id = '2' and o.orders_id = '1' and o.order_status = '3' and o.orders_id = op.orders_id and op.orders_products_id = opd.orders_products_id and opd.orders_products_download_id = '1' and opd.orders_products_filename != ''

[TEP STOP]


Unquote:

Can you help me decipher what this error means? Any help will be truly appreciated. "I'm SO CLOSE!" /rolleyes.gif' class='bbc_emoticon' alt=':rolleyes:' />



Ok guys,

whilst looking on here for help in other areas, i still see that some are having problems in being able to get the downloads to work. Soo herre is the info for you thanks to my research on here and those that posted them in the first place:

Have you downloads activated??

If not you have to do this via the admin panel. In the 'Configuration' panel click 'Download'. Once you have that done click 'Enable download' and set it to 'true'.

You then have associate the sownloadable file to the product so you have to go into the 'Catalog' menu and click the 'Product Attributes' link. When you get to this page you will see three options 'Product Options', 'Option Values' and 'Products Attributes'. In the 'Product Options' menu enter a new option name called 'Download'. Once you have that entered go over to the 'Option Values' and enter in 'Yes' for the 'Download' option. Once you have all that done now you can go to the 'Product Attributes' panel and select your pruduct. Set the 'Option Value' for 'Download' and set the 'Option Value' to 'Yes'. Directly below the 'Option Name' there is a text window called 'Filename:'. Here you have to enter the name of the file thats associated with your product. Then just enter the expiry times etc and bobs your uncle.

Of course all this is useless if you do not have your product uploaded to the correct directory. The default directory is called 'download' but since you are selling a digital product I would reccommend that you change the name of the folder as this is the first place any hacker would look to get your stuff for free. If you do decide to change the name of the folder you will also have to change the name in 'includes/configure.php' to reflect the changes you made to the download folder.

no once you have done this the downloads will automatically be available upon a credit card payment. So, test cards will still allow them to steal the download for free. To ensure that the customer can only download once you have physically been paid add the foolowing code:

If you have the default osc catalog\download.php file try changing first sql query to this:
CODE

// Check that order_id, customer_id and filename match
$downloads_query = tep_db_query("select date_format(o.date_purchased, '%Y-%m-%d') as date_purchased_day, opd.download_maxdays, opd.download_count, opd.download_maxdays, opd.orders_products_filename from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " opd where o.customers_id = '" . $customer_id . "' and o.orders_id = '" . (int)$HTTP_GET_VARS['order'] . "' and o.order_status = '3' and o.orders_id = op.orders_id and op.orders_products_id = opd.orders_products_id and opd.orders_products_download_id = '" . (int)$HTTP_GET_VARS['id'] . "' and opd.orders_products_filename != ''");
This code should only allow the d/l if the order is set to delivered. so in admin control panel, if you click on the customer orders and then set the order from pending to delivered, the customer ONLY then will be allowed to click the link and download their order.

This STOPS ALL customer from sttealing your downloads by using the test credit card number (which I wont display even you know it as it is not fair).

Hope you get it and it works as I am using it and it works great.
Thanks
RJ


Don't give up. I see light ahead...!

#4   after8hrs

after8hrs
  • Members
  • 36 posts

Posted 18 October 2006 - 09:07

Thnaks for sharing! Your post is more down to earth if compare to instruction on Page 16 of MS2.2 Knowledge Base.

I followed your way and had a test on my own site, registered a customer id, logged in and put in shopping cart a downloadable product, checked out, all fine so far.

Then i logged in the admin/backend, set the order status as "Delivered".

Then i logged in again with the customer id, checked in my cart. I clicked on my order, and saw there was a link to downloadable product. I clicked the link but there was nothing there.

Anyone experienced this before?

#5   stu2000

stu2000
  • Members
  • 465 posts

Posted 18 October 2006 - 12:44

try setting in downloads redirect to false
Stuart

#6   after8hrs

after8hrs
  • Members
  • 36 posts

Posted 19 October 2006 - 02:22

try setting in downloads redirect to false


I reset download by redirect back to 'false', it worked right away. Thank you stu2000.

Edited by after8hrs, 19 October 2006 - 02:25.


#7   Time Punk

Time Punk
  • Members
  • 10 posts

Posted 05 November 2006 - 18:06

I get this error message with downloads redirect on both true and false:

1054 - Unknown column 'o.order_status' in 'where clause'

select date_format(o.date_purchased, '%Y-%m-%d') as date_purchased_day, opd.download_maxdays, opd.download_count, opd.download_maxdays, opd.orders_products_filename from orders o, orders_products op, orders_products_download opd where o.customers_id = '20' and o.orders_id = '4' and o.order_status = '3' and o.orders_id = op.orders_id and op.orders_products_id = opd.orders_products_id and opd.orders_products_download_id = '54' and opd.orders_products_filename != ''

[TEP STOP]


Anybody know what it could mean ?

#8   DragnSoul

DragnSoul
  • Members
  • 28 posts

Posted 05 November 2006 - 22:18

Thanks for all the great help... I added everything that was mentioned and I can download files from my store as long as it's a single download... Is there a way to change it so I can allow multiple downloads for a product? I.E. 3 Files to download on one purchase? Thanks for the help.

#9   Sam60

Sam60
  • Members
  • 9 posts

Posted 07 November 2006 - 03:29

Thanks for all the great help... I added everything that was mentioned and I can download files from my store as long as it's a single download... Is there a way to change it so I can allow multiple downloads for a product? I.E. 3 Files to download on one purchase? Thanks for the help.


You did not say what help you got...So I am still in the dark as to how to correct this problem..Pls can you share the solution

#10   DragnSoul

DragnSoul
  • Members
  • 28 posts

Posted 07 November 2006 - 04:10

I set my download to "true" then added priduct Attributes "download" and the ID set to "yes". I can now download, since I am only using PayPal on my site it worked right away. Now all I have to try and figure out is how to allow my buyers to download multiple files after purchasing the product (I make all my zip files to roughly 30MB's to help my buyers who are on dial-up). The big issue is that OsCommerce sets the name of the download to "download.zip" for all files, instead of using the actual file name. Once I figure that part out I'll post it here.

#11   Sam60

Sam60
  • Members
  • 9 posts

Posted 07 November 2006 - 05:59

I set my download to "true" then added priduct Attributes "download" and the ID set to "yes". I can now download, since I am only using PayPal on my site it worked right away. Now all I have to try and figure out is how to allow my buyers to download multiple files after purchasing the product (I make all my zip files to roughly 30MB's to help my buyers who are on dial-up). The big issue is that OsCommerce sets the name of the download to "download.zip" for all files, instead of using the actual file name. Once I figure that part out I'll post it here.

Did you make the changes mention below..and is it working for you?

If you have the default osc catalog\download.php file try changing first sql query to this:
CODE

// Check that order_id, customer_id and filename match
$downloads_query = tep_db_query("select date_format(o.date_purchased, '%Y-%m-%d') as date_purchased_day, opd.download_maxdays, opd.download_count, opd.download_maxdays, opd.orders_products_filename from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " opd where o.customers_id = '" . $customer_id . "' and o.orders_id = '" . (int)$HTTP_GET_VARS['order'] . "' and o.order_status = '3' and o.orders_id = op.orders_id and op.orders_products_id = opd.orders_products_id and opd.orders_products_download_id = '" . (int)$HTTP_GET_VARS['id'] . "' and opd.orders_products_filename != ''");
This code should only allow the d/l if the order is set to delivered. so in admin control panel, if you click on the customer orders and then set the order from pending to delivered, the customer ONLY then will be allowed to click the link and download their order.



#12   beachkitty85

beachkitty85
  • Members
  • 54 posts

Posted 07 November 2006 - 21:08

I have done everything suggested here and my download link still won't work. After my purchase, it says I have 1 download remaining, but there is no link to actually download the file. Could someone please help me? Thanks so much!

#13   DragnSoul

DragnSoul
  • Members
  • 28 posts

Posted 07 November 2006 - 23:33

Ok, I will be posting a nice long message later tonight that will encompass setting downloads up and setting it so you can have multiple downloads for 1 single product (I manage a digiscrapping store and that is a big requirement for dial-up users). It may help some of you get everything working. I may also add a mod in the contributions that make allowing multiple downloads easier. Hopefully this will help people out as I did struggle in the beginning also.

#14   Brown Knight

Brown Knight
  • Members
  • 90 posts

Posted 08 November 2006 - 00:08

order status should be set to updated for the initial setting

#15   bkellum

bkellum
  • Members
  • 4,893 posts

Posted 09 November 2006 - 23:52

I have done everything suggested here and my download link still won't work. After my purchase, it says I have 1 download remaining, but there is no link to actually download the file. Could someone please help me? Thanks so much!

I have the same issue. Any solutions to this? /crying.gif' class='bbc_emoticon' alt=':'(' />

Thanks,

Bill
Bill Kellum

Sounds Good Productions
STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

#16   DragnSoul

DragnSoul
  • Members
  • 28 posts

Posted 10 November 2006 - 00:45

I have the same issue. Any solutions to this? /crying.gif' class='bbc_emoticon' alt=':'(' />

Thanks,

Bill



Bill,

Under "filename" what did you put in as a link?

DragnSoul

#17   bkellum

bkellum
  • Members
  • 4,893 posts

Posted 10 November 2006 - 01:31

Bill,

Under "filename" what did you put in as a link?

DragnSoul

I put the name of the file (STS_tips.zip).
Bill Kellum

Sounds Good Productions
STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

#18   bkellum

bkellum
  • Members
  • 4,893 posts

Posted 10 November 2006 - 15:31

I have the same issue. Any solutions to this? /crying.gif' class='bbc_emoticon' alt=':'(' />
Thanks,
Bill

YEA!!!! /biggrin.gif' class='bbc_emoticon' alt=':D' />

Problem solved. I can't believe it was as simple as a typo.

In my catalog/includes/configure.php file, down in the downloads section, their was a missing "/" in my catalog name:
define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
  define('DIR_FS_CATALOG', '/home/sounkel6/public_html/eshop');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
It should be:
define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
  define('DIR_FS_CATALOG', '/home/sounkel6/public_html/eshop/');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

Now my download links work perfectly. Yippee!! Woo Hoo!!! /biggrin.gif' class='bbc_emoticon' alt=':D' /> /biggrin.gif' class='bbc_emoticon' alt=':D' /> /biggrin.gif' class='bbc_emoticon' alt=':D' />
Bill Kellum

Sounds Good Productions
STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

#19   Pure & Applied

Pure & Applied
  • Members
  • 7 posts

Posted 30 December 2006 - 15:31

Hello all...

My downloads appear to working well using NOCHEX, I still haven't tried it with PayPal - (the sandbox account is a real pain!)

My question is -
I'm giving customers 5 downloads.
How do I tell when they've used up all their downloads?

Thanks
Dave





YEA!!!! /biggrin.gif' class='bbc_emoticon' alt=':D' />

Problem solved. I can't believe it was as simple as a typo.

In my catalog/includes/configure.php file, down in the downloads section, their was a missing "/" in my catalog name:

define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
  define('DIR_FS_CATALOG', '/home/sounkel6/public_html/eshop');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
It should be:
define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
  define('DIR_FS_CATALOG', '/home/sounkel6/public_html/eshop/');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

Now my download links work perfectly. Yippee!! Woo Hoo!!! /biggrin.gif' class='bbc_emoticon' alt=':D' /> /biggrin.gif' class='bbc_emoticon' alt=':D' /> /biggrin.gif' class='bbc_emoticon' alt=':D' />



#20   Bluntknife

Bluntknife
  • Members
  • 22 posts

Posted 03 January 2007 - 16:27

Brilliant Cyber2000 many thanks. This was just what I was looking for and it works perfectly.
/smile.gif' class='bbc_emoticon' alt=':)' />