Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 3 votes

TO HELP THOSE WITH DOWNLOAD PROBLEMS


88 replies to this topic

#41 siegfred

  • Community Member
  • 1 posts
  • Real Name:siegfred bacs

Posted 01 June 2007, 19:21

View PostCyber2000, on Nov 12 2005, 08:58 PM, said:

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

Now my problem is about my download link. Although the script given gives me the capability to hold downloads until the order is set to delivered. I still have the link to download the file even though it is still set to pending, however it does not allow me to download the file when i click on the link, it just gives me a blank page. a link somewhat like this: catalog/download.php?order=8&id=9

What i want is to have the download link grayed out / not clickable or even not viewable when the download is still set at pending state, and only enabled/viewed when the download is in delivered state.

#42 isrbrown

  • Community Member
  • 23 posts
  • Real Name:Heather Thompson

Posted 21 June 2007, 17:29

:thumbsup:
Thanks for this Post and all the dialogue here. I am also wondering what can be done to "pretty up" pending orders if the customer clicks the link and attempts to download without actually paying for a download. Is there another tips and tricks section that might provide input on the blank page?? Could I add a text page saying your order will be available as soon as your funds are ... ha ha ha. Something, I could use for Check & Money order purchases which would tell the customer that they have reached that page because their order has not been paid for and to watch their email for more information after they have paid.

This would be a nice little add on.
Again excellent Posting
Heather

#43 upyakilt

  • Community Member
  • 2 posts
  • Real Name:Warren

Posted 27 June 2007, 14:54

View PostCyber2000, on Nov 12 2005, 12:58 PM, 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

Hi.

Is there any way of allowing clients to download without paying? I want to allow them to download .pdf files and i dont really need the cart & checkout option as my site is mainly for sharing information for my clients.

Your help would be greatly appreciated.

Cheers.
Warren

#44 Sizdaddy

  • Community Member
  • 7 posts
  • Real Name:Eric

Posted 27 June 2007, 16:54

Is there a way to auto confirm the downloads in the update process of the admin section? Is there a way to set the default to delivered so that the consumer can automatically download the product without me having to go in and do it manually?

#45 thewoodparlour

  • Community Member
  • 1 posts
  • Real Name:Randy and Tonya

Posted 06 July 2007, 04:21

Some of you may have already figured this out but just in case...

If you are still having problems with:
"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]"

My fix was correcting a typo in the provided code at the beginning of this thread:
// 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 != ''");

Change o.order_status = '3' to o.orders_status = '3'

For some reason, my column name has an 's' in my orders table.

Hope this helps.......thanks to all you programmers who developed this great piece of software. I sure don't mind finding these little things since you folks have done the hard part of writing the base code. Thanks, too, to all the contributors who share.

T

#46 dpcamp

  • Community Member
  • 5 posts
  • Real Name:Derek Campanile

Posted 12 July 2007, 20:14

I'm having a problem where when you click the link it just sends you a blank page.. why??/

#47 ibmeubu

  • Community Member
  • 9 posts
  • Real Name:Richard
  • Location:Surf City, USA

Posted 25 July 2007, 22:23

Talk about frustration.... I have checked, double checked and triple checked all of the changes and fixes that all of you awesome people have posted here but, for some reason, I STILL can't get my download link to show up. I am selling information in PDF format and once the payment process is complete there is no link. Do I have to set certain files to certain privilages? I am using the default "download" folder until I can get through this. It is set at 775. I don't know what else to do at this point. :'( Thx in advance.

#48 pburt

  • Community Member
  • 13 posts
  • Real Name:Pam Burt
  • Gender:Female
  • Location:Arkansas

Posted 27 July 2007, 21:14

Probably the most stupid question (stupidest) that you will see in this post... How much of the filename do you need in the attributes section....? I have checked everything else and it is on target. I just can't get the downlink to show up after paying with paypal.

I put the file name only (yourfilename.pdf)

do you put... catalog/download/yourfilename.pdf ?

or just yourfilename.pdf
or do I have to go the whole route and put everything in.... i'm stuck and have been working on this (and the shipping problems I ve been having for three days.... I need a valium!

pam

#49 bkellum

  • Community Member
  • 4,892 posts
  • Real Name:Bill Kellum
  • Gender:Male
  • Location:Chicago

Posted 27 July 2007, 21:29

View Postpburt, on Jul 27 2007, 04:14 PM, said:

Probably the most stupid question (stupidest) that you will see in this post... How much of the filename do you need in the attributes section....? I have checked everything else and it is on target. I just can't get the downlink to show up after paying with paypal.

I put the file name only (yourfilename.pdf)

do you put... catalog/download/yourfilename.pdf ?

or just yourfilename.pdf
or do I have to go the whole route and put everything in.... i'm stuck and have been working on this (and the shipping problems I ve been having for three days.... I need a valium!

pam
Just the "yourfilename.pdf" is needed and it should be uploaded to your download folder. See the following link for my info:
http://forums.oscommerce.com/index.php?showtopic=236224
Bill Kellum

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

#50 pburt

  • Community Member
  • 13 posts
  • Real Name:Pam Burt
  • Gender:Female
  • Location:Arkansas

Posted 27 July 2007, 22:19

View Postbkellum, on Jul 27 2007, 04:29 PM, said:

Just the "yourfilename.pdf" is needed and it should be uploaded to your download folder. See the following link for my info:
http://forums.oscommerce.com/index.php?showtopic=236224

I appreciate such a quick reponse. Thank you.

I went through everything again.... I checked the slash in the code as well. it's there.
The only thing I see that is different is that I have a pdf file rather than a zip file. Could this be causing it? I'll change that and see if it is working. (One file that I was using as a test is actually a txt file. I'll change that one too.)

The link just doesn't show up. at all. I also looked in "my account" and it wasn't there either.

pam

#51 czarbjones

  • Community Member
  • 36 posts
  • Real Name:Ben

Posted 01 August 2007, 11:12

View Postpburt, on Jul 28 2007, 08:19 AM, said:

I appreciate such a quick reponse. Thank you.

I went through everything again.... I checked the slash in the code as well. it's there.
The only thing I see that is different is that I have a pdf file rather than a zip file. Could this be causing it? I'll change that and see if it is working. (One file that I was using as a test is actually a txt file. I'll change that one too.)

The link just doesn't show up. at all. I also looked in "my account" and it wasn't there either.

pam

I provide PDF files on my site and they work fine Pam, so I'm guessing it's something else. Sorry I can't help more than that though.

#52 czarbjones

  • Community Member
  • 36 posts
  • Real Name:Ben

Posted 01 August 2007, 13:41

Re: The blank page on the download link. This occurrs when the order status is set to anything but "Delivered", the idea is that you only allow them to download the product once payment has been confirmed, ie Credit Card, PayPal and so on.

Therefore what I did was change: /includes/languages/english/checkout_success.php

from:

define('FOOTER_DOWNLOAD', 'You can download your products at a later time at \'%s\'');

to:

define('FOOTER_DOWNLOAD', '* You can also download your products at a later time at \'%s\'.<br>* If you paid by EFT, Cheque or Money Order then we will notify you when the link(s) are active!');

So that the customer know's why the links are inactive and I also made a similar note at the bottom of each product description so that they know if they pay by Credit Card or PayPal (for example) then they can download them immediately.

Hope that helps!

If anyone can suggest how to change that blank page with a similar comment that would be great.

#53 toddarice

  • Community Member
  • 7 posts
  • Real Name:toddarice

Posted 05 August 2007, 17:15

Problem solved. solution

#54 bodhost.com

  • Community Member
  • 8 posts
  • Real Name:jazz anderson

Posted 10 August 2007, 12:52

I would like to appreciate cyber2000 for this wonderful posting it really helps me to solve my problem related to this issue.

Edited by bodhost.com, 10 August 2007, 12:55.


#55 pifactory

  • Community Member
  • 8 posts
  • Real Name:David Whitfield

Posted 14 August 2007, 01:06

Hi... These posts are really useful... so thanks.

BUT I'm still struggling to get my download link to appear.

I notice in the includes/configure.php file that there's a reference to:

define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
define('DIR_FS_CATALOG', '/home/myusername/myurl/catalog/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

Yet in my oscommerce set up I do not have a directory called download_public and my catalog directory sits inside the directory with the name of my site url. Is this a clue?

When I run my site I get a message to say that my download directory is not valid, even though it exists and has 755 permissions set.

Ideas much appreciated.

David Whitfield

#56 Don_Hartman

  • Community Member
  • 3 posts
  • Real Name:Don

Posted 17 August 2007, 17:58

I am having a problem after cc payment.

1054 - Unknown column 'comments' in 'field list'

insert into orders (customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, date_purchased, last_modified, orders_status, comments, currency, currency_value) values ('7', 'Don Hartman', '', '75 Village', '', 'Cleves', '47002', 'Indiana', 'United States', '513-353-2709', 'd-hart@ci.rr.com', '2', ' ', '', '', ', '', '', '', '', '', 'Don Hartman', '', '75 Village', '', 'Cleves', '47002', 'Indiana', 'United States', '2', 'Credit Card', 'Visa', 'Don Hartman', '41111******11111', '1207', now(), now(), '2', '', 'USD', '1.00000000')

[TEP STOP]


Where would this be fixed at ? I did not install this module so I am not up to speed with all its changes.
Also we will be selling items that get shipped. How can I get a download purchase only to show the free shipping .
And, if they purchase other items that will be shipped we want the free shipping to hidden from selection. In other words,
if they buy the free item (cd) and then other items, we just want it to calculate 0 weight for the cd (without displaying the free shipping option)
, but charge normal shipping for the remainder of the items. First, I need to fix the problem at the top of the list - error in field list, though.

Don

#57 jd1234

  • Community Member
  • 7 posts
  • Real Name:jordan

Posted 19 August 2007, 21:59

ALSO -- if you're STILL having problems getting the download link to show up (like i was),
i finally realized that the download link will ONLY show if you added the products to
the shopping cart from the products DETAIL page. it will NOT work if you use the "buy now"
from the product listing page.

there may be a contribution for adding the product options to the listing page, which
i believe is what you will have to do to get it to work from there.

Edited by jd1234, 19 August 2007, 22:00.


#58 from_oscommerce@wein.ca

  • Community Member
  • 10 posts
  • Real Name:Robert Wein

Posted 04 January 2008, 03:26

I have seen a similar problem to mine but no solution that hits it on the head.

I have both physical products (that are shipped) and virtual products. The virtual products have a file to be downloaded and therefore no shipping.

The solution that someone said earlier in the posts was to set weight to zero and remove the shipping module. I can't do that because I ship some of the products.

How can I set some products to "Not Shipped" and others to "To Be Shipped"?

Anyone?

THanks!

Rob

#59 CKENT00369

  • Community Member
  • 39 posts
  • Real Name:Chris
  • Gender:Male

Posted 13 February 2008, 01:17

Everything with me is working great I have RC2 then only thing that I am having an issue with is that when I select a download product and add to cart then go to check out, it is putting shipping onto it. Like others have said I cant uninstall my shipping module because I do have other products that do ship. I looked at a mod for free shipping if 0 weight but it does not have instructions for editing the file yourself, as i have some other contributions I dont want to mess those up. What can I do?

#60 F1ReMaN

  • Community Member
  • 1 posts
  • Real Name:Omri Levy

Posted 28 February 2008, 22:16

First of all thanks for this great post. It helped me a lot today.
I have a music label and I'm usually selling cds.

I would like to start selling mp3s.
Now, I have a title (A) - this is the cd
Under the format - the user should be able to choose
a. Download only (cheap)
b. CD (and he gets the mp3s for free)

The price on top is for the cd.

The question is: I don't want the format prices to be relative. The cd price is +0 but when i put -20 in the mp3 price the user gets a strange price and I would just like to set a proper price for it.

Hope you understand.