osCommerce Community Support Forums: TO HELP THOSE WITH DOWNLOAD PROBLEMS - osCommerce Community Support Forums

Jump to content

Corporate Sponsor


Tips and Tricks Guidelines

Tips and tricks are only allowed to be posted in this forum channel. For support, please post in another related channel in this forum. If you come across a post not related to a tip or trick, please report it so it can be deleted.
  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

TO HELP THOSE WITH DOWNLOAD PROBLEMS PLEASE READ ! - IT WILL HELP YOU ! Rate Topic: ***** 3 Votes

#1 User is offline   Cyber2000 Icon

  • Find Posts
  • Group: Community Member
  • Posts: 31
  • Joined: 02-November 05
  • Real Name:RJ

Posted 12 November 2005 - 12:58 PM

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
0

#2 User is offline   lolo25 Icon

  • Find Posts
  • Group: Community Member
  • Posts: 1
  • Joined: 21-September 06
  • Real Name:malfois lô

Posted 21 September 2006 - 09:54 AM

[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
0

#3 User is offline   TechieTW Icon

  • Find Posts
  • Group: Community Member
  • Posts: 95
  • Joined: 25-September 06
  • Real Name:TW
  • Location:Idaho

Post icon  Posted 26 September 2006 - 03:28 AM

: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:



View PostCyber2000, on Nov 12 2005, 06:58 AM, said:

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...!
0

#4 User is offline   after8hrs Icon

  • Find Posts
  • Group: Community Member
  • Posts: 36
  • Joined: 25-May 06
  • Real Name:frank w

Posted 18 October 2006 - 09:07 AM

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?
0

#5 User is offline   stu2000 Icon

  • Find Posts
  • Group: Community Member
  • Posts: 465
  • Joined: 13-October 03
  • Real Name:Stuart Newton
  • Gender:Male
  • Location:Aberdeen, Scotland, UK

Posted 18 October 2006 - 12:44 PM

try setting in downloads redirect to false
Stuart
0

#6 User is offline   after8hrs Icon

  • Find Posts
  • Group: Community Member
  • Posts: 36
  • Joined: 25-May 06
  • Real Name:frank w

Posted 19 October 2006 - 02:22 AM

View Poststu2000, on Oct 18 2006, 12:44 PM, said:

try setting in downloads redirect to false


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

This post has been edited by after8hrs: 19 October 2006 - 02:25 AM

0

#7 User is offline   Time Punk Icon

  • Find Posts
  • Group: Community Member
  • Posts: 10
  • Joined: 22-October 06
  • Real Name:Jamie Stewart

Posted 05 November 2006 - 06:06 PM

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 ?
0

#8 User is offline   DragnSoul Icon

  • Find Posts
  • Group: Community Member
  • Posts: 28
  • Joined: 02-October 06
  • Real Name:Jean Patry
  • Location:Wainwright Alberta

Posted 05 November 2006 - 10:18 PM

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

#9 User is offline   Sam60 Icon

  • Find Posts
  • Group: Community Member
  • Posts: 9
  • Joined: 07-November 06
  • Real Name:Egbert Williams

Posted 07 November 2006 - 03:29 AM

View PostDragnSoul, on Nov 5 2006, 06:18 PM, said:

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
0

#10 User is offline   DragnSoul Icon

  • Find Posts
  • Group: Community Member
  • Posts: 28
  • Joined: 02-October 06
  • Real Name:Jean Patry
  • Location:Wainwright Alberta

Posted 07 November 2006 - 04:10 AM

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

#11 User is offline   Sam60 Icon

  • Find Posts
  • Group: Community Member
  • Posts: 9
  • Joined: 07-November 06
  • Real Name:Egbert Williams

Posted 07 November 2006 - 05:59 AM

View PostDragnSoul, on Nov 7 2006, 12:10 AM, said:

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?

Quote

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.

0

#12 User is offline   beachkitty85 Icon

  • Find Posts
  • Group: Community Member
  • Posts: 54
  • Joined: 07-November 06
  • Real Name:Christina
  • Gender:Female
  • Location:Morrisville, NC, USA

Posted 07 November 2006 - 09:08 PM

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!
0

#13 User is offline   DragnSoul Icon

  • Find Posts
  • Group: Community Member
  • Posts: 28
  • Joined: 02-October 06
  • Real Name:Jean Patry
  • Location:Wainwright Alberta

Posted 07 November 2006 - 11:33 PM

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

#14 User is offline   Brown Knight Icon

  • Find Posts
  • Group: Community Member
  • Posts: 90
  • Joined: 23-August 06
  • Real Name:B Knight

Posted 08 November 2006 - 12:08 AM

order status should be set to updated for the initial setting
0

#15 User is offline   bkellum Icon

  • Find Posts
  • Group: Community Member
  • Posts: 4,572
  • Joined: 20-February 06
  • Real Name:Bill Kellum
  • Gender:Male
  • Location:Chicago

Posted 09 November 2006 - 11:52 PM

View Postbeachkitty85, on Nov 7 2006, 04:08 PM, said:

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? :'(

Thanks,

Bill
Bill Kellum

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

#16 User is offline   DragnSoul Icon

  • Find Posts
  • Group: Community Member
  • Posts: 28
  • Joined: 02-October 06
  • Real Name:Jean Patry
  • Location:Wainwright Alberta

Posted 10 November 2006 - 12:45 AM

View Postbkellum, on Nov 9 2006, 04:52 PM, said:

I have the same issue. Any solutions to this? :'(

Thanks,

Bill



Bill,

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

DragnSoul
0

#17 User is offline   bkellum Icon

  • Find Posts
  • Group: Community Member
  • Posts: 4,572
  • Joined: 20-February 06
  • Real Name:Bill Kellum
  • Gender:Male
  • Location:Chicago

Posted 10 November 2006 - 01:31 AM

View PostDragnSoul, on Nov 9 2006, 07:45 PM, said:

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 Twitter:@soundsgoodpro
STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
0

#18 User is offline   bkellum Icon

  • Find Posts
  • Group: Community Member
  • Posts: 4,572
  • Joined: 20-February 06
  • Real Name:Bill Kellum
  • Gender:Male
  • Location:Chicago

Posted 10 November 2006 - 03:31 PM

View Postbkellum, on Nov 9 2006, 05:52 PM, said:

I have the same issue. Any solutions to this? :'(
Thanks,
Bill
YEA!!!! :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!!! :D :D :D
Bill Kellum

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

#19 User is offline   Pure & Applied Icon

  • Find Posts
  • Group: Community Member
  • Posts: 7
  • Joined: 25-October 06
  • Real Name:Dave

Posted 30 December 2006 - 03:31 PM

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





View Postbkellum, on Nov 10 2006, 03:31 PM, said:

YEA!!!! :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!!! :D :D :D

0

#20 User is offline   Bluntknife Icon

  • Find Posts
  • Group: Community Member
  • Posts: 22
  • Joined: 03-January 07
  • Real Name:Paul

Posted 03 January 2007 - 04:27 PM

Brilliant Cyber2000 many thanks. This was just what I was looking for and it works perfectly.
:)
0

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic