Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 3 votes

TO HELP THOSE WITH DOWNLOAD PROBLEMS


88 replies to this topic

#61 jesifra

  • Community Member
  • 3 posts
  • Real Name:Marc-Charles Nicolas

Posted 06 March 2008, 01:26

View PostBluntknife, on Jan 3 2007, 04:27 PM, said:

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


I need our help guys Please help. I am still not able to get the download feature working on my website. Can anyone assist me and I will give a donation to that person.

Thanks,

#62 michaelwl

  • Community Member
  • 10 posts
  • Real Name:Michael

Posted 09 March 2008, 14:48

I've been searching through this forum for help with my problem related to the download but can't find what I'm looking for.

My product downloads are working when I have the Credit Card payment module enabled, i.e. when the client checks out the Credit Card payment option appears. If I use any other payment modules they don't appear during checkout.

How can I get around this? We don't offer Credit Card purchases on our site.

I'd really appreciate some help.

Thanks, Michael

#63 redneckchick621

  • Community Member
  • 251 posts
  • Real Name:Michelle
  • Gender:Female
  • Location:Tennessee

Posted 27 March 2008, 04:18

View Postpburt, on Jul 27 2007, 05: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


Hahaha! Ive been posting questions and reading and posting and reading for days and I think this thread finally answered my question. Thanks to all who have contributed to it. If it doesnt work, wanna share those valiums?????
Chelle - PHP Code Destructor at Large :D

1. Don't do as I do, do as I say! BACKUP, BACKUP, BACKUP before editing files!
2. When all else fails, the forum is your friend. If that fails, Google is your friend. If you find yourself with no friends, grab a hammer and a stiff drink.

#64 redneckchick621

  • Community Member
  • 251 posts
  • Real Name:Michelle
  • Gender:Female
  • Location:Tennessee

Posted 27 March 2008, 04:36

GRRRRRRRRRRRRRRR I have done everything here...even went as far as to copy and past the code provided, added the "s", changed the redirect to false and I am STILL getting this error:

Parse error: syntax error, unexpected T_LNUMBER in /home/XXXXXX/public_html/catalog/download.php on line 23

I dont need the valium now, I need a shot or two of Jim Beam and I dont drink anymore!

This thread has helped to get the link there though, so I am grateful for that. What am I doing wrong. Here is the code in my file:

// 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.orders_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 != ''");
" . TABLE_ORDERS_STATUS . " os where o.customers_id = '" . $customer_id . "' and o.orders_id = '" . (int)$HTTP_GET_VARS['order'] . "' 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 != ''"); and o.orders_status = os.orders_status_id and os.downloads_flag = '1' and os.language_id = '" . (int)$languages_id . "'");
if (!tep_db_num_rows($downloads_query)) die;
$downloads = tep_db_fetch_array($downloads_query);

After the code changes you listed after the semicolon, there is nothing else in your post. Should I delete what is there after that was the existing code? Have I missed a semicolon, apostrophe, space, something???? Oh man, hacking code is nerve racking!

Your expertise is VERY MUCH APPRECIATED.
Michelle
Chelle - PHP Code Destructor at Large :D

1. Don't do as I do, do as I say! BACKUP, BACKUP, BACKUP before editing files!
2. When all else fails, the forum is your friend. If that fails, Google is your friend. If you find yourself with no friends, grab a hammer and a stiff drink.

#65 dloud2002

  • Community Member
  • 4 posts
  • Real Name:Dave

Posted 28 March 2008, 17:23

I too am having this problem. I have changed the code, added the s to orders etc. I did a test run using my wifes CC and everything went well with Paypal. I got the link to take me back to my website on the paypal confirm page and the link was where it is supposed to be under the "download link" heading on my site. It is clickable BUT...when I click on the link, it takes me to an Internal Error page. This is so frustrating as I am so close to launching my site. It is all downloadable items on my site so I need to know how to resolve this.
Anyone have a clue?
Thanks in advance.
Dave.

#66 redneckchick621

  • Community Member
  • 251 posts
  • Real Name:Michelle
  • Gender:Female
  • Location:Tennessee

Posted 30 March 2008, 02:50

View Postdloud2002, on Mar 28 2008, 01:23 PM, said:

I too am having this problem. I have changed the code, added the s to orders etc. I did a test run using my wifes CC and everything went well with Paypal. I got the link to take me back to my website on the paypal confirm page and the link was where it is supposed to be under the "download link" heading on my site. It is clickable BUT...when I click on the link, it takes me to an Internal Error page. This is so frustrating as I am so close to launching my site. It is all downloadable items on my site so I need to know how to resolve this.
Anyone have a clue?
Thanks in advance.
Dave.


I was having that problem when I took the advice of the initial post and changed the name of my download folder. Once I changed it back, it works fine. Make sure in your products attributes that you have the exact name of the file listed in either all uppercase or all lowercase letters and it is a zip file. All of this, however, still does not prevent people from abusing the link. I had a friend and my mom try it all out, they were able to purchase and download, however, my friend paid with an echeck through paypal. What is to stop someone from dl the product and then cancelling their echeck? Very frustrating sometimes getting things right. One answer creates another question. LOL Have you figured out that dilemma and how did you fix it? Hope this helps.

Michelle
Chelle - PHP Code Destructor at Large :D

1. Don't do as I do, do as I say! BACKUP, BACKUP, BACKUP before editing files!
2. When all else fails, the forum is your friend. If that fails, Google is your friend. If you find yourself with no friends, grab a hammer and a stiff drink.

#67 dloud2002

  • Community Member
  • 4 posts
  • Real Name:Dave

Posted 01 April 2008, 17:01

View Postredneckchick621, on Mar 30 2008, 02:50 AM, said:

I was having that problem when I took the advice of the initial post and changed the name of my download folder. Once I changed it back, it works fine. Make sure in your products attributes that you have the exact name of the file listed in either all uppercase or all lowercase letters and it is a zip file. All of this, however, still does not prevent people from abusing the link. I had a friend and my mom try it all out, they were able to purchase and download, however, my friend paid with an echeck through paypal. What is to stop someone from dl the product and then cancelling their echeck? Very frustrating sometimes getting things right. One answer creates another question. LOL Have you figured out that dilemma and how did you fix it? Hope this helps.

Michelle
Hi, I haven't got it resolved yet. I have to change virtually all of my zip file names to lower case. Bummer!! Oh well.. Also I am having a problem with paypal who for some unknown reason, disabled my bank account. Am emailing them about it today. Dunno what the deal is there! As for the echeck thing, I am using just credit or debit card payments on my site if and when paypal re-instates my bank account lol. You have a point there about canceling the echeck though.
Trying to get a business online is kinda hard!! Lots of problems arising all the time. Oh well. Once I figure it all out I hope it works out for me and for everyone trying to get an online biz going.
I'll keep yah posted LOL.
Dave.

#68 redneckchick621

  • Community Member
  • 251 posts
  • Real Name:Michelle
  • Gender:Female
  • Location:Tennessee

Posted 02 April 2008, 07:40

View Postdloud2002, on Apr 1 2008, 01:01 PM, said:

Hi, I haven't got it resolved yet. I have to change virtually all of my zip file names to lower case. Bummer!! Oh well.. Also I am having a problem with paypal who for some unknown reason, disabled my bank account. Am emailing them about it today. Dunno what the deal is there! As for the echeck thing, I am using just credit or debit card payments on my site if and when paypal re-instates my bank account lol. You have a point there about canceling the echeck though.
Trying to get a business online is kinda hard!! Lots of problems arising all the time. Oh well. Once I figure it all out I hope it works out for me and for everyone trying to get an online biz going.
I'll keep yah posted LOL.
Dave.


I appreciate it. I ordered "PHP and MySQL for Dummies" tonite...LOL Im gonna figure it all out if it kills me. Will let you know if I find out in the meantime. Ive got this problem posted on another site forum. Waiting for a response/resolution. Will let you know.

Michelle
Chelle - PHP Code Destructor at Large :D

1. Don't do as I do, do as I say! BACKUP, BACKUP, BACKUP before editing files!
2. When all else fails, the forum is your friend. If that fails, Google is your friend. If you find yourself with no friends, grab a hammer and a stiff drink.

#69 chris thomas

  • Community Member
  • 12 posts
  • Real Name:Chris Thomas

Posted 02 April 2008, 16:40

I'm actually in the evaluation stages with regards to osCommerce. I currently use a commercial system on my shops host. The main reasons for me wanting to move ships are...

* My providers E-Store has not been upgraded in 4 years (!)
* It costs quite a lot in terms of fees
* Their tech support is abysmal (recently I get put through to people who do not even code, let alone know how the store actually works)

Now, there is another reason for the move. I run a DVD training business, so we produce training material and ship it to customers via land/air mail. We have been having more and more requests for download delivery instead of physical, and I have to say it does make sense. However, our titles are pretty huge, like between 800mb and 4.5gig per item. And if someone buys all 30 of our titles, thats a LOT of data.

The other issue is security. We need to ensure that a customer is the only person that can download our titles (that they have paid for) and that they can only do so once payment has cleared. We need to also watermark our downloads to each customer, so if they give them to their friends, we can track the naughty blighters down :)

So, ideally what we need is a system which...

* Allows customers to choose either mail delivery or download delivery
* Either type of delivery is only authorized once payment is cleared. Ideally this would be as automated as possible
* For downloads we need to create an order folder for each order
* Item folders are created in each order folder, and the files in those item folders will be simlinked from elsewhere on the server
* A single file per item will be watermarked in some way, and placed in each item folder (this allows for tracking pirated items down the line)
* Once payment is deemed cleared, a link to these items will be mailed to the customer

So, pretty complex. We need to use simlinked files for the majority of each customers order to simply keep the storage sizes down on the server. A single order could in theory be 120gb in size, so we need the vast majority of that data to be instanced from elsewhere, with only the "watermarked" files being unique to the order.

With this being the case, does anyone have any experience with setting up this kind of system, or have they used a commercial developer for OSC, that has carried out similar work. Push come to shove, I know some PHP and mySQL, but my time is very short (I reallt need to concentrate on making more DVDs...), so paying a developer to do this would certainly be an idea.

Any help/ideas welcome.

Cheers

Chris Thomas

#70 josy

  • Community Member
  • 45 posts
  • Real Name:josephine carson
  • Gender:Female
  • Location:Airdrie Scotland

Posted 14 April 2008, 18:06

View Postczarbjones, on Aug 1 2007, 02:41 PM, said:

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.



all of my customers will be paying by paypal so is there anyway i could add a notice to that blank page telling them what paypal requires me to tell them:

Example: Thank you for your payment. Your transaction has been completed, and a receipt for your purchase has been emailed to you. You may log into your account at www.paypal.com to view details of this transaction.
and then add a link below to the customers myaccount page, were they can download thier products,

Edited by josy, 14 April 2008, 18:07.


#71 josy

  • Community Member
  • 45 posts
  • Real Name:josephine carson
  • Gender:Female
  • Location:Airdrie Scotland

Posted 14 April 2008, 23:15

:( :o i have my link showing up now but when i click the link its shows this error:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@magical-creations.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

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


instead of giving me the download , can any one please help with this ?

#72 ehm01

  • Community Member
  • 25 posts
  • Real Name:ehm01

Posted 21 April 2008, 01:31

I follow step by step every single instructions here and still the link is not showing on my...

I have RC2.2a

I'm using CVV module "Credit Card with CVV2 Version v2.2RC2a"
Which I'm starting thinking maybe will be part of the problem..

My donwload.php is slight different from the original one:

// 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, " . TABLE_ORDERS_STATUS . " os where o.customers_id = '" . $customer_id . "' and o.orders_id = '" . (int)$HTTP_GET_VARS['order'] . "' and o.orders_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 != '' and o.orders_status = os.orders_status_id and os.downloads_flag = '1' and os.language_id = '" . (int)$languages_id . "'");

So i just inserted the and o.orders_status='3' there (do I have to add any " or _ ???)

Any one here is using CVV on their shopping cart AND still have the download working?

Thank you

#73 christiansees

  • Community Member
  • 143 posts
  • Real Name:christian
  • Location:Olympia WA USA

Posted 03 May 2008, 00:14

Hello All,
I am having a problem with the account_history_info.php page while doing the v2.2 RC2 Upgrade. I keep getting an SQL error. The pages that I have problems with are checkout_success.php account_history_info.php and download.php.

Quote

1054 - Unknown column 'os.orders_status_id' in 'where clause'

select o.orders_status, date_format(o.last_modified, '%Y-%m-%d') as date_purchased_day, opd.download_maxdays, op.products_name, opd.orders_products_download_id, opd.orders_products_filename, opd.download_count, opd.download_maxdays from orders o, orders_products op, orders_products_download opd where o.customers_id = '2' and o.orders_status >= '2' and o.orders_id = '6213' and o.orders_id = op.orders_id and op.orders_products_id = opd.orders_products_id and opd.orders_products_filename != '' and o.orders_status = os.orders_status_id and os.downloads_flag = '1' and os.language_id = '1'

[TEP STOP]
What it seems to correspond to is the line 213 of account_history_info.php
  $statuses_query = tep_db_query("select os.orders_status_name, osh.date_added, osh.comments from " . TABLE_ORDERS_STATUS . " os, " . TABLE_ORDERS_STATUS_HISTORY . " osh where osh.orders_id = '" . (int)$HTTP_GET_VARS['order_id'] . "' and osh.orders_status_id = os.orders_status_id and os.language_id = '" . (int)$languages_id . "' and os.public_flag = '1' order by osh.date_added");
but this doesn't make sense either as TABLE_ORDERS_STATUS . "os," is declared, and not missing also order_status_id is a column in table order_status in the database.
I'm stumped :blink: Any help is much appreciated.
Thanks
Christian
On your last day only you will have to approve or disaprove of how your life has been.

#74 jag.gre@iinet.net.au

  • Community Member
  • 1 posts
  • Real Name:Jenny Green

Posted 05 May 2008, 05:52

I tried your suggestion of changing the "download" folder to be renamed as "product" and updating the configuration file.

Unfortunately it then broke the site with the following error. I reinstated the folder name and config file but still have the same error.

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'xxxxx'@'localhost' (using password: NO) in /home/......./includes/functions/database.php on line 19
Unable to connect to database server!

Any idea why it might be doing this?

Any help appreciated at this point.

#75 bkjproductions

  • Community Member
  • 2 posts
  • Real Name:Brian K. Johnson

Posted 29 June 2009, 21:16

I know this is a reply to an OLD post and of course it's been fixed in later versions, but in the event that someone else has just stumbled across this after much head-wall-banging....
There is a typo in that, you probably want
o.orders_status rather than o.order_status

In this example we're checking to see if the status is 3 (delivered) OR 4 (allow download)

$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.orders_status = '3' or o.orders_status = '4') and o.orders_id = op.orders_id and op.orders_products_id = opd.orders_products_id and opd.orders_products_download_id = '" . $id . "' and opd.orders_products_filename != ''");

Of course when the person clicks on the download they'll get "Can't find ID 3434" or some number.
So add a little note about payment, a couple of lines later where you see the "DIE" command.

if (!tep_db_num_rows($downloads_query)) die( "Can't find ID $id; perhaps the payment for this item has not yet been processed?");

It might be more elegant to use a tep_redirect to go to some other page that has a fancier message, of course, but one could argue that if you think someone's trying to steal a download then you're not going to dress up for a burglar.

--Brian

#76 hammershell

  • Community Member
  • 20 posts
  • Real Name:Mark Madsen
  • Gender:Male

Posted 25 September 2009, 20:28

I got mine to work, I did everything for setting it up stated here and also MADE sure that the attribute was labeled 'Download' with only one option called 'Yes.'
Then the important part is I purchased a new product and then it worked. It would not work with the older product before i reset the attribute right.
www.starportsoftware.com
Websites and software

#77 purplemartinart

  • Community Member
  • 83 posts
  • Real Name:susan halp
  • Gender:Female
  • Location:usa

Posted 14 March 2010, 05:57

View PostCyber2000, on 12 November 2005, 12:58, said:

Ok guys,

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.


RJ

RJ I deliver physical goods also and would like to make download available when order status is set to processing or In-transit say, that I physically go through, as I don't want to have it have to be delivered if the customer is waiting for other items via snail mail. Can you direct me to how to alter my download.php to arrange for this? Otherwise all your tips worked great and the download option tests out great. But do want to make it impossible for folks to download stuff for free...
thanks !!
Thanks,
Susan


Proudly uses Oscommerce!

#78 purplemartinart

  • Community Member
  • 83 posts
  • Real Name:susan halp
  • Gender:Female
  • Location:usa

Posted 15 March 2010, 03:06

OK, I hope I got this right but in that previous bit I changed
and o.order_status = '3'
to
and o.order_status = '2'

cross your fingers... :blink:
Thanks,
Susan


Proudly uses Oscommerce!

#79 purplemartinart

  • Community Member
  • 83 posts
  • Real Name:susan halp
  • Gender:Female
  • Location:usa

Posted 15 March 2010, 05:33

NOPE, didn't work. I got an error and the sale was automatically moved to processing.
Thanks,
Susan


Proudly uses Oscommerce!

#80 ~Kira

  • Community Member
  • 181 posts
  • Real Name:Starlight Design
  • Gender:Female
  • Location:USA

Posted 25 March 2010, 17:15

Quote

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.

ok but what about customers who pay and want their download? You *should* be able to set the default status ID for orders to "Delivered" so they can download it, but then what about customers who order physical products that have to be shipped? You can just tell them it's already delivered.
☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆