Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

TO HELP THOSE WITH DOWNLOAD PROBLEMS


Cyber2000

Recommended Posts

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

Link to comment
Share on other sites

  • 10 months later...
  • Replies 88
  • Created
  • Last Reply

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

Link to comment
Share on other sites

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

 

 

 

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

Link to comment
Share on other sites

  • 4 weeks later...

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?

Link to comment
Share on other sites

  • 3 weeks later...

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 ?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

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

Link to comment
Share on other sites

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

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

Link to comment
Share on other sites

  • 1 month later...

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

Link to comment
Share on other sites

I've done everything mentioned in this thread - but I do not get a link to download teh product either in my account or after I test buy the product.

Link to comment
Share on other sites

I've done everything mentioned in this thread - but I do not get a link to download teh product either in my account or after I test buy the product.
Hey Mike,

 

Try my step by step that I listed in detail in the following post:

 

http://www.oscommerce.com/forums/index.php?s=&...st&p=968212

 

 

 

I also found that osCommerce is very fussy with the name of your download file. It is better if the name is all upper or lower case with no spaces and includes the file extension (.zip). :thumbsup:

 

 

 

Hope this helps you out,

 

Bill Kellum

Bill Kellum

 

Sounds Good Productions

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

Link to comment
Share on other sites

Hey Mike,

 

Try my step by step that I listed in detail in the following post:

 

http://www.oscommerce.com/forums/index.php?s=&...st&p=968212

 

 

 

I also found that osCommerce is very fussy with the name of your download file. It is better if the name is all upper or lower case with no spaces and includes the file extension (.zip). :thumbsup:

 

 

 

Hope this helps you out,

 

Bill Kellum

 

No luck so far. I still don't get a download link.

Link to comment
Share on other sites

Once I create a new order status (in this case 'updated') and then change the invoice to the new order status I get this error:

Fatal error: Call to undefined function tep_get_configuration_key_value() in /home/xxxx/public_html/shop_dev/admin/orders.php on line 56

Link to comment
Share on other sites

  • 4 weeks later...

What if the downloaded file was not a real 'download' but a page that played the real video, wmv, quicktime file instead?

 

Is that possible?

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...