Jump to content
bkellum

OsCommerce Download Feature

Recommended Posts

Sorry Bill, I have to correct this one. For security reason, all downloads must be located UNDER the downloads/ folder. SDS allows to store downloads in subfolders under it for better management. Storing downloads on a second server is way beyond the scope of SDS, and it will cost more than double to setup a osCommerce download shop this way.

Alex,

Thanks for correcting me on the details of your great contribution (Super Download Shop). I have always used the default downloads directory but wasn't sure if your contribution did something different.

 

I still think he could benefit by using your contribution since it makes it easier to manage each downloadable product in it's own subfolder.


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites

Hello everyone!

I am new to osCommerce, and I read this topic, but there's only one thing I'm not sure of. I'm building an mp3 download site and I wonder do I still have to rename .mp3 files to .zip files, or I can keep them?

Thanks,

hr

Share this post


Link to post
Share on other sites

Bill,

I am going to try the download items suggested on the first page but I have a different situation.

 

I am running a repair service for electronics, the downloaded item is only a packing instructions for the purchaser of the product. I do not need to check validity of credit cards, etc.

 

If they don't pay for it and send it to me I now have 'free' product! :lol: (just kidding).

 

Can this be setup so the user pays and immediately gets the download?

 

Thank you, Bob

Share this post


Link to post
Share on other sites
Bill,

I am going to try the download items suggested on the first page but I have a different situation.

 

I am running a repair service for electronics, the downloaded item is only a packing instructions for the purchaser of the product. I do not need to check validity of credit cards, etc.

 

If they don't pay for it and send it to me I now have 'free' product! :lol: (just kidding).

 

Can this be setup so the user pays and immediately gets the download?

 

Thank you, Bob

Bob, yes, this can be setup and if I understand you correctly, your situation is a basic downloadable product setup. You shouldn't have any problems. Use the sample digital product already in the downloads folder. I think it is called unreal.zip. Set that up as one of your products with the download attributes set and then test it out.

 

Hope this helped you out,


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites

I'm using the download feature successfully, but found a problem. If the download file is over 33.3 MB, it does't work. The customer just gets a "page cannot be displayed" when the download link it clicked. Anything less than that size works fine, anything larger than that, it doesn't work. So, I found in phpMyAdmin, products_attributes_download, the following information:

 

Space usage

Type - Usage

Data - 24,088 B

Index - 9,216 B

Total - 33,304 B

 

So, the 33,304 B looks like the size limit of what I can have as a download file. That's the same as 33.3 MB, yes? Hmmm, maybe not. Anyway, these numbers, if you look, are not editable. I thought I could just increase it to 100,000 B and fix my problem, but I can't change these numbers as far as I can tell.

 

Any thoughts?

 

Steve Doherty

Share this post


Link to post
Share on other sites
I'm using the download feature successfully, but found a problem. If the download file is over 33.3 MB, it does't work. The customer just gets a "page cannot be displayed" when the download link it clicked. Anything less than that size works fine, anything larger than that, it doesn't work. So, I found in phpMyAdmin, products_attributes_download, the following information:

 

Space usage

Type - Usage

Data - 24,088 B

Index - 9,216 B

Total - 33,304 B

 

So, the 33,304 B looks like the size limit of what I can have as a download file. That's the same as 33.3 MB, yes? Hmmm, maybe not. Anyway, these numbers, if you look, are not editable. I thought I could just increase it to 100,000 B and fix my problem, but I can't change these numbers as far as I can tell.

 

Any thoughts?

 

Steve Doherty

Steve, You may be interested in the following contributions by Alex:

 

http://addons.oscommerce.com/info/994

 

http://www.oscommerce.com/community/contributions,4868


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites

Hi, i've tried everything (except starting over) that's been said in the thread but am unable to see a clickable link, my head hurts, i've been trying to figure out what am i doing wrong. any body else in my boat

Edited by entree

Share this post


Link to post
Share on other sites
For those experiencing problems using the download feature in osCommerce.

...

Good Luck,

Bill Kellum

Hello Bill.

 

I've been pulling my hair out on this too.

I've followed your instructions,

I've tried deleting my product and recreating it,

I have a attribute called "Download" and "Yes" (case sensitve)

I'm using unreal.zip from the download directory. (case sensitive)

I reviewed my admin/download settings - true true 7 5, I've also tried true false 7 5

I reviewed my configuration.php and confirmed that download and pub are followed by /

I've given all my categories sort orders > 0 - per http://forums.oscommerce.com/lofiversion/i...hp?t272171.html

I do not have a manufacturer called "downloads"

I've tried leaving quantity, model, image, url, weight blank.

I'm testing purchases by using cash/money order and manually setting them to "delivered" via admin

When I log in as a user, I do NOT see any download link.

I have not modified any templates - it's the default installed "oscommerce look"

gzip compression is DISABLED

CLEAN install of osCommerce Online Merchant v2.2 RC2a , with paypal, usps, ups, and tinymce modules

error_log is clean.

owner of pub and download is www-data - which is what it needs to be apparantly for me to upload.

pub directory is empty.

 

in catalog/includes/configure.php (was already there) and catalog/admin/includes/configure.php (wasn't there by default)

define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');

define('DIR_FS_CATALOG', '/var/www/store.mediaangels.com/catalog/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

What page does the download link show up on for the user? I'm loggin gin, and I goto my account, I've tried viewing my orders.

 

If you could provide assistance? - You seem to be the guru on this.

Share this post


Link to post
Share on other sites
Hello Bill.

I'm testing purchases by using cash/money order and manually setting them to "delivered" via admin

 

I also just tried using paypal standard. and still no link for download.

 

couple strands of hair left.

Share this post


Link to post
Share on other sites

FOR THOSE WHO THIS STILL DOESN"T WORK - you have to enable downloads under localization!!!

 

Go to admin, localization, order status

 

there, you want to enable download status for whatever status you want to display the download link for.

Share this post


Link to post
Share on other sites

AND FOR THOSE WHO WANT TO KNOW WHERE THIS LINK IS SUPPOSED TO SHOW UP:

 

customer loggs in,

go to "my account"

click to view the order in which they purchased the downloadable product

Under "Order History", there is another table called "DOwnload Links" - this table is only shown when an order is at the status specified in localization per my last comment.

Share this post


Link to post
Share on other sites
FOR THOSE WHO THIS STILL DOESN"T WORK - you have to enable downloads under localization!!!

 

Go to admin, localization, order status

 

there, you want to enable download status for whatever status you want to display the download link for.

 

Sometimes it is the simple things. Before you tear open that computer, check to see that it is plugged in first. :rolleyes: Glad you found your solution.


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites

ive started another topic somewhere and didnt get any response.

 

ive got a problem with downloads (as have many other people). now everything that i know of is working fine, i have tested out a fake payment for a CD, but my store will also need to do downloadables. now the CD payment went through perfectly with paypal, but in the admin section, wher you click on a certain downloadable item it keeps saying at the top 'Warning: No file uploaded.' But i have uploaded it to the downloads folder. but i am not sure what to type in the filename under product attributes. is it just the filename (because that doesnt appear to get rid of the message) or the http address, or just www..... or the server home/user/public_html/blabla???

 

any help is much appreciated

 

thanks

 

carlos

Share this post


Link to post
Share on other sites

I had the same issue as some of you. My download link was always active regardless of the status of the order (pending, processing, delivered).

 

So I updated the query in /includes/modules/downloads.php

 

Around line 24

 

From:

 

// Get last order id for checkout_success
// Now get all downloadable products in that order
 $downloads_query = tep_db_query("select date_format(o.date_purchased, '%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 " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " opd where o.customers_id = '" . (int)$customer_id . "' and o.orders_id = '" . (int)$last_order . "' and o.orders_id = op.orders_id and op.orders_products_id = opd.orders_products_id and opd.orders_products_filename != ''");

 

To be:

 

// Get last order id for checkout_success
// Now get all downloadable products in that order with status set to 3 (delivered)
 $downloads_query = tep_db_query("select date_format(o.date_purchased, '%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 " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " opd where o.customers_id = '" . (int)$customer_id . "' and o.orders_id = '" . (int)$last_order . "' and o.orders_id = op.orders_id  and o.orders_status = '3' and op.orders_products_id = opd.orders_products_id and opd.orders_products_filename != ''");

 

The difference between the two is I added in

 

and o.orders_status = '3'

 

To the query as it seemed to be missing from the default install.

 

Hope that helps others to solve the problem.

 

Regards,

Ben.

Share this post


Link to post
Share on other sites

ok so i got the download to work... but i also need a options to send them to a online form to fill out the info if they dont want to download it... what do you think is the best way to do this?

Share this post


Link to post
Share on other sites

I've been pulling my hair out on this too.

I've followed your instructions,

I've tried deleting my product and recreating it,

I have a attribute called "Download" and "Yes" (case sensitve)

I'm using unreal.zip from the download directory. (case sensitive)

I reviewed my admin/download settings - true true 7 5, I've also tried true false 7 5

I reviewed my configuration.php and confirmed that download and pub are followed by /

I do not have a manufacturer called "downloads"

I've tried leaving quantity, model, image, url, weight blank.

I'm testing purchases by using creditcard order and manually setting them to "delivered" via admin

When I log in as a user, I do NOT see any download link.

I have not modified any templates - it's the default installed "oscommerce look"

gzip compression is DISABLED

CLEAN install of osCommerce Online Merchant v2.2 RC2a , with credit card and paypal modules

 

I have gone to admin, localization, order status and set Download status on for even pending orders.

 

What I get is this. Nothing is linked or downloadable.

 

ScreenShot_Download_Error.jpg

 

Any help on how to get the link, passwords etc to show up will be greatly appreciated!

Share this post


Link to post
Share on other sites
And I set the dir attributes like this:

pub 755

download 755

test file - unreal.zip 644

 

What I've come to realize is that the Download link will only work with orders placed after the changes. So follow the set up steps found on this thread for the Download link to work, and then place your order and test it. If it's not working go through the installation steps, make adjustments and then create a new order. If you switch anything regarding your product, your previous orders will keep the old product setup, or so it seems.

 

Just a thought....

 

Ed

:huh:

Edited by emckula

Share this post


Link to post
Share on other sites

Hello, Ok I am having a hard time with the download. I got everything down okay, the download link shows up and everything seems fine, but when i click the link to download and save it to my harddrive, it just downloads a ghost file with no file size. The files are all over 90mb. What could be causing this? The download completes in like 2 seconds, but i know with a file size of 90mb it should take longer than that. Any suggestions on what the problem is? Thanks

Share this post


Link to post
Share on other sites

[*]Enable downloads in the admin/configure/downloads section of your store,

[*]Upload your product to the cataloag/downloads folder as a zip file (using no spaces in the name)

[*]Create a products page as you would normally for any product you sell

[*]Go to admin/catalog/product attributes page. Under "Product Options", create a new option called "Download" or something that you and your customer will recognize.

[*]In the same Product Attributes page, create a Option Value of "YEs" or "Only" or whatever.

[*]Still in the Product Attributes page, at the bottom of the page, you will find a drop down menu of each of your products. Find the product that you wish to offer as a download and select it.

[*]Under the Option Name, choose "Download" or whatever you used in step 4 above.

[*]Under Option Value, choose "yes" or whatever you used in step 5 above.

[*]Set your price for the product or leave blank.

[*]Skip the Prefix section.

[*]Type in the exact name of the download file as it is saved in your catalog/downloads folder as you did in step 2 above. Remember, no spaces in the filename and include the .zip extention.

[*]Set the number of days the purchased download will be available to your customer.

[*]Set the maximum amount of downloads tries you wish to grant to your customer. You should at the very least give your customer 2 tries, in case something happens to thier connection.

[*]Finally, click the "insert" button at the far right.

[*]Your product is now available for download.

:thumbsup:

 

Good Luck,

Bill Kellum

 

I did all of these steps, made sure the permissions on pub and download are 755, made sure the files are all lowercase, no spaces. Did the localization step and checked the / on pub and download. Still no live link to download. Answers? Suggestions? Anyone?

Edited by thetongueuntied

Share this post


Link to post
Share on other sites

Why would deleting the product_info.php file possibly bring up the download link? Is there specific code for the download link to before offered and what file or folder would it be in?

Share this post


Link to post
Share on other sites

I think you may have misunderstood the product_info.php file for the actual product. Try deleting the product and starting from the begining. This has solved the "no link" problem for many who have tried the above and still no luck.


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×