Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Super Download Store for Version 2.3.x


Guest

Recommended Posts

I just installed a clean version of osCommermerce. I try to install this contribution but there's something that's not working. When I tried to execute the SQL Setup_Orders_Status, my Phpadmin said the following, #1054 - Unknown column 'public_flag' in 'field list'. Would anyone help me further?

Link to comment
Share on other sites

  • 3 weeks later...

Chris,

 

Do you really fully understand the original code I wrote for SDS?

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Link to comment
Share on other sites

  • 1 month later...

Hi folks,

 

i'm a little confused, how this contribution should work correctly.

 

I spend very much time to find the error, because in the last published version, buyers got an instand download without paying and so on.

 

in catalog/download.php

$downloads_query = tep_db_query("select date_format(o.last_modified, '%Y-%m-%d') as date_purchased_day, o.orders_status, 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 >= '0' 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 != ''");

 

o.orders_status >= '0'

 

See the red marked Value!!

How should this work with Download Controller?

 

The orders_status would be allways greater as 0

 

I think the correct Value should be: o.orders_status >= DOWNLOADS_CONTROLLER_ORDERS_STATUS

 

The same is in catalog/includes/modules/download.php

 

Greetings,

Holger

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...

Set up the superdownload store as instructed in addon folder.

 

While running catalog/admin/filegroup_db_setup.php

 

Getting the error:

 

 

1146 - Table 'kmdb.products_attributes_download_groups' doesn't exist

 

select * from products_attributes_download_groups where download_group_id = 0 and language_id = '1'

 

[TEP STOP]

 

 

 

Any advice?

Best.

Aj :-)

 

 

 

This is the Official Support Thread for Super Download Store for osCommerce 2.3.x

 

 

This contribution is based on Super Download Shop for version 2.2 RC2a (http://addons.oscommerce.com/info/4868)

----------------------------------------------------

Super Download Shop contribution is an enhancement of the osCommerce download module and download file management, including following features:

 

* Secure download for pending orders based on DownLoads Controller v5.3 by Linda McGrath which was the best solution to secure downloads. Without similar control, customers could get their downloads before they actually pay.

 

* Group files download per product which enable download shops to offer multiple files in a single product. With this ability, shop owners can:

 

- Break a large download file into a group of files, to prevent problems like insufficient resource, time out errors...etc.

- Bundle multiple downloads in one package to increase sells.

 

* Store download files in sub folders under the download directory to improve the file management.

 

* Built-in superior file management interface in admin panel.

 

------------------------------------------------------------------------------------------------

Changes include:

 

* File changes to work with the 960 Grid System

* Creation of an Order Status SQL to set the orders status automatically

* Rewrite of the installation file

* Addition of Manual Installation Instructions

Link to comment
Share on other sites

OK what I did was I ignored STEP 3.2 - in install.html and overwrote the files. Now I did as directed but getting the error below while trying to run - catalog/admin/filegroup_db_setup.php

 

 

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /public_html/km/admin/includes/database_tables.php:66) in /public_html/km/admin/includes/functions/sessions.php on line 102

 

Warning: Cannot modify header information - headers already sent by (output started at /public_html/km/admin/includes/database_tables.php:66) in /public_html/km/admin/includes/functions/general.php on line 34

 

 

Any resolution?

Best.

Aj :-)

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

First off, thanks for the free addon.

 

However, I wouldnt be posting just for that, sad world, I know.

I have this issue, with redirect disabled (didnt work on linux os), that file downloads get merged with themselves.

EG: Download mp3 on 4.4 megs, receive 8.8 with track looping twice, same with raw text files containing 123, gets to 123123 upon receiving.

 

Any chance for some help here?

 

Best Regards,

Mark

Link to comment
Share on other sites

Hi,

First off, thanks for the free addon.

 

However, I wouldnt be posting just for that, sad world, I know.

I have this issue, with redirect disabled (didnt work on linux os), that file downloads get merged with themselves.

EG: Download mp3 on 4.4 megs, receive 8.8 with track looping twice, same with raw text files containing 123, gets to 123123 upon receiving.

 

Any chance for some help here?

 

Best Regards,

Mark

 

Figured out a few things.

 

Made som changes in catalog/download.php

First off, changed $buffersize to whatever 1024*1024 equals.

Also, I added a few lines in the header file, to allow proper mp3, zip, and more fileformats.

Apparently the current upload script appends a line of text at the beginning of each download.

 

// Now send the file with header() magic
 header("Expires: Mon, 26 Nov 1962 00:00:00 GMT");
 header("Last-Modified: " . gmdate("D,d M Y H:i:s") . " GMT");
 header("Cache-Control: no-cache, must-revalidate");
 header("Pragma: public");
 header("Content-Transfer-Encoding: binary");
 header("Content-Type: application/zip");
 header("Content-disposition: attachment; filename=\"" . $file_name . "\"");
   ob_clean();
   flush();
   echo readfile("$file_name");

 

With the flush and ob_clean command, things are working for me :-)

Link to comment
Share on other sites

I've installed this contribution and everything works great - thank you!

 

My only issue is that the download link is not available automatically after ordering - I have to update the order status for it to appear.

 

I've got the order status 'Download Now Available' (ID=15) to be the automatic status once a PayPal order is completed, and also set this to default. I have also set order id 15 as the value for 'Downloads Controller Orders Status Value' in Configuration>Download.

 

When I manually update the order status the link appears, but on completion of the order this doesn't happen automatically - can anyone help please?

hor-i-zon

Link to comment
Share on other sites

Andrew,

 

 

Ensure the order status values are set correctly and that the, nothing below 10 will allow for downloads. Also ensure you have downloads enabled in admin>> configuration>> downloads

 

 

 

 

 

Chris

Link to comment
Share on other sites

  • 2 weeks later...

Another screenshot that might help is of the screen you get when confirming the order. It looks like the system wants to provide a download link, but doesn't:

 

http://awesomescreenshot.com/0fbgihycc

 

And when I switch the status to pending and then back to 'Download Available' it works ok...

 

 

http://awesomescreenshot.com/05fgii7c7

hor-i-zon

Link to comment
Share on other sites

I've just noticed that the download expiry date on the order confirmation screen is 7/12/1999, but on the account screen it's correctly 20/7/2011 - this is probably the issue. Can anyone suggest why the order is returning from PayPal with that expiry date?

hor-i-zon

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

Great add-on, but I have a similar (but not exact same) problem.

 

Everything works fine, but regardless of order status settings, successful orders *always* have a status of Processing and so have the "on hold" message (even though Download Now Available is set to default), and the download link is only available if I manually set the status to Download Now Available (even though the download should be available when "Processing" is the status).

 

Also what is the significance of the Downloads Controller Status Value?

 

Cheers

Link to comment
Share on other sites

  • 4 weeks later...

Chris:

 

I have added this add-on today manually. Everything appears to have gone very smoothly. Now, can anyone tell me how to ADD a Product to be a downloaded product? I can't seem to see where this is done. I've looked under Add New Product and looked under Product Attributes and can't seem to figure this out. Sorry in advance if this is a simple request, I'm completely new to the whole osCommerce engine.

 

Thanks in advance for helping me out.

Link to comment
Share on other sites

  • 1 month later...

Chris:

 

I have added this add-on today manually. Everything appears to have gone very smoothly. Now, can anyone tell me how to ADD a Product to be a downloaded product? I can't seem to see where this is done. I've looked under Add New Product and looked under Product Attributes and can't seem to figure this out. Sorry in advance if this is a simple request, I'm completely new to the whole osCommerce engine.

 

Thanks in advance for helping me out.

 

 

I hope you have this sorted by now. I f you havent.

 

To create a downloadable product, you first need to create the product in your store. Once done you need to go to product attributes, and select the product you have created from the drop down list. You thren set up the attribute and ensure that the file name also includes the file type so it may be something like oooooo.zip. Save the attribute and now when you open the product in your store you should have an attribute to select on the product info page.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

  • 2 months later...

===Error---The file filename.zip doesn't exist.---in "Files In Group" area===

 

 

Hello. I love the idea of this addon.

 

However, it cannot seem to work on my server. The only problem is that when I put a filename for a downloadable product in the "Files In Group" area, I keep getting an error: The file filename.zip doesn't exist.

I tried multiple clean reinstalls, and I'm still getting this error. All the files are in the download folder and the correct name is used.

 

Anyone experienced the same problem and got around it?

Any help would be much appreciated!!!

 

Thanks in adavancesmile.png

Link to comment
Share on other sites

 

Hi,

First off, thanks for the free addon.

 

However, I wouldnt be posting just for that, sad world, I know.

I have this issue, with redirect disabled (didnt work on linux os), that file downloads get merged with themselves.

EG: Download mp3 on 4.4 megs, receive 8.8 with track looping twice, same with raw text files containing 123, gets to 123123 upon receiving.

 

Any chance for some help here?

 

Best Regards,

Mark

 

----------------------

 

 

Figured out a few things.

 

Made som changes in catalog/download.php

First off, changed $buffersize to whatever 1024*1024 equals.

Also, I added a few lines in the header file, to allow proper mp3, zip, and more fileformats.

Apparently the current upload script appends a line of text at the beginning of each download.

 

// Now send the file with header() magic
 header("Expires: Mon, 26 Nov 1962 00:00:00 GMT");
 header("Last-Modified: " . gmdate("D,d M Y H:i:s") . " GMT");
 header("Cache-Control: no-cache, must-revalidate");
 header("Pragma: public");
 header("Content-Transfer-Encoding: binary");
 header("Content-Type: application/zip");
 header("Content-disposition: attachment; filename=\"" . $file_name . "\"");
ob_clean();
flush();
echo readfile("$file_name");

 

With the flush and ob_clean command, things are working for me :-)

 

 

 

I'm experiencing the same situation, I tested a raw .TXT file with the numbers 12345, once downloaded I have 1234512345. The same text file in ZIP file, once unzipped contains the proper 12345, but double the file size.

 

By the way, the stock download (before installing Super Download Shop) worked fine. The zip file were downloaded without the double size bug, and also download by redirect worked.

 

I tried your modifications, but I am still downloading the zip files at double the size, and download by redirect still doesn't work. It is important to mention that the zip files are not corrupted, and the content within the zip file is fine and has the proper file size. It is only the ZIP file itself that is double the file size.

 

Any suggestions?

 

 

Regards,

 

Steve

Link to comment
Share on other sites

Steve,

 

I have been following this thread and your current issues and have tried to replicate them on a fresh installation but so far I have been unsuccessful. Do you have any compression, or download accelerators enabled ? I personally use this contribution on all of my virtual product website and offer files in PDF, .ZIP and JPG format with no issues. This is why I decided to try a .TXT file to see if it was something with the file type, the test .TXT downloaded correctly.

 

More information would be needed to allow me (us) to diagnose the issue.

 

 

 

 

Chris

Link to comment
Share on other sites

Hi Chris,

 

thanks for your time.

 

I GOT IT!

 

I was using the manual install document, and I found an error in the instructions, after comparing the php files from the contribution and the manual install document.

 

For catalog/downloald.php the manual installation instructions omits to mention that you must delete this php script from the original downloald.php file =>

 

DELETE

 

// Fallback to readfile() delivery method. This will work on all systems, but will need considerable resources

readfile(DIR_FS_DOWNLOAD . $downloads['orders_products_filename']);

 

before the closing ?> of the file.

 

 

Before, I had this from the manual installation :

 

// This will work only on Unix/Linux hosts

tep_unlink_temp_dir(DIR_FS_DOWNLOAD_PUBLIC);

$tempdir = tep_random_name();

umask(0000);

mkdir(DIR_FS_DOWNLOAD_PUBLIC . $tempdir, 0777);

// BOF Super Download Store v2.3.x mod

symlink(DIR_FS_DOWNLOAD . $downloads['orders_products_filename'], DIR_FS_DOWNLOAD_PUBLIC . $tempdir . '/' . $file_name);

tep_redirect(DIR_WS_DOWNLOAD_PUBLIC . $tempdir . '/' . $file_name);

} else {

// This will work on all systems, but will need considerable resources

// We could also loop with fread($fp, 4096) to save memory

set_time_limit(0); // Prevent the script from timing out for large files

tep_download_buffered(DIR_FS_DOWNLOAD . $downloads['orders_products_filename']);

// EOF Super Download Store v2.3.x mod

}

 

// Fallback to readfile() delivery method. This will work on all systems, but will need considerable resources

readfile(DIR_FS_DOWNLOAD . $downloads['orders_products_filename']);

?>

 

It is imperative to delete the :

 

 

// Fallback to readfile() delivery method. This will work on all systems, but will need considerable resources

readfile(DIR_FS_DOWNLOAD . $downloads['orders_products_filename']);

 

If I put this code back, my downloads are back with double the file size.

 

Perhaps the manual installation document could be updated?

 

I'm glad to share this fix if anyone else has the same issue.

 

Now the only thing not working is the download by redirect, which gives me an error:

 

Not found.

The requested URL /catalog/pub/.dvyrzgrhckfpllmcctbb/testfile.zip was not found on this server.

 

Is download by redirect the best method? or download without redirect?

I have a dedicated server with 2GB of RAM, 2.4GhZ core2-duo dual-core processor, running linux on a 100Mbps port. So am I really needing download by redirect or it is a waste or ressource? I'm not sure which download method is the best to avoid too much stress on my server?

 

thanks again for your time.

 

 

Regards,

Steve

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...