Jump to content
AlexStudio

[contribution] Super Download Store

Recommended Posts

Here is a check list for missing download links:
Did you ever make a download link appear before installing SDS?

 

If the answer is no, I can't do much help.

 

If the answer is yes, but no download link after SDS installed:

1. check if you have set the orders status correctly (follow the instruction carefully).

2. check if you have done the modifications in checkout_process.php

3. check if the filename is spelled correctly (case sensitive), and the file does exist in the right place.

 

Reasons of missing download links:

  1. no download filenames logged with the orders. Something's wrong in checkout_process.php
  2. the download file cannot be located. Either the filenames are wrong or the files don't exist.
  3. orders status value is lower than the downloads controller orders status value.
  4. download expired. If the last_modified datetime was not inserted with the order record, which means that the modification in checkout_process.php is missing, download will always be expired.

You need to check your paypal_ipn.php as well where checkout_process.php was mentioned above.

 

And please use the Search Topic button near the bottom of this page to find your answers before posting.


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.

Share this post


Link to post
Share on other sites

My aploogies.

 

I figured out how to make the downloads work.

 

But the econd part of my question is basically saying, how can I ahve the Oscommerce send and email atumatically with furthere infromation about thire order?

Share this post


Link to post
Share on other sites
You can put your own words in the order confirmation emails sent by checkout_process.php. Further more, with some php coding skill and the knowledge about osCommerce order class structure, you can put different messages in the email for each 'order content type' (such as 'virtual', 'phisical' or 'mixed').

 

This question is beyond the scope of this contribution, please search other threads or forums to find your answers.


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.

Share this post


Link to post
Share on other sites

Not sure if this is a bug or just something I do not set correctly

 

Installed everything fine and all is working except for one thing...

 

I placed a test order on Nov 5th for a download. Worked like a charm and the download worked fine. Now today I was in the admin area and noticed that the order that was placed on the 5th still shows download still available rather then delivered.

 

I logged into the client area and checked status of previous orders. This is what I have:

 

11/05/2007 Pending

11/05/2007 Download Now Available

Download links

file name here Link expires: Monday 12 November, 2007 4 downloads remaining

 

 

Now shouldn't the admin area and client (Customer) order info show it as delivered?

 

Once again it appears to all be working fine but wanted to know if there was a way to have order for admin and customer update to completed or delivered after the expiration date?

 

Once again thanks for a great contribution!

Share this post


Link to post
Share on other sites
When a download expired, you can no longer download it, even it's still saying download now available (which is the orders status text). You need to manually change the orders status in admin. There is no way to update orders status automatically on download's expiry.

 

I have a script working in my live store, updating all orders status by a sigle click, and it checks which orders should be updated to delivered. This piece of code is partially hardcoded, and need some more works to make it available for everyone. I'll include this feature in the next update release.


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.

Share this post


Link to post
Share on other sites

Ok thats good to know that it is a normal process then.....

 

I would be interested in trying that new code out in the future if you get it ready.

 

Once again thanks!

Share this post


Link to post
Share on other sites

Hi Alex,

a few months ago i asked for some advice because ordering of elements in the displayed download table is not possible.

you answered, that you will implement it in a future release.

 

my questions: will there be a future release?

and if not: would it be a big problem to give me some hints, where and what to implement so that i could do it by myself?

 

Greets

Stan

Share this post


Link to post
Share on other sites

We just migrated to a new server....

 

I noticed today this problem when doing a test order

 

The files download thru the program as they should - However they do not play

on the computer they are downloaded to.

 

I used FTP to download the same file and it played correctly.

 

I compared the file sizes of the download.

 

The file downloaded thru web browser is 1 byte bigger then the same file

downloaded thru ftp that works fine.

 

So it looks like 1 byte is being added to all files downloaded thru the VOD

site causing the file to be corrupt and unable to be opened on the downloaded

computer.

 

By changing some coding I have managed to get rid of that extra bit of data

But the file is still corrupt when it is downloaded. Here is my download code

that downloads the file from the server to the customer that I changed and the extra byte went away

 

header("Pragma: public");

header("Expires: 0");

header("Cache-Control: must-revalidate, post-check=0,

pre-check=0");

header("Cache-Control: public", false);

header("Content-Description: File Transfer");

header("Content-Type: aApplication/octet-stream");

header("Accept-Ranges: bytes");

header("Content-Disposition: attachment; filename=\"" .

$file_name . "\";");

header("Content-Transfer-Encoding: binary");

header("Content-Length: " . filesize(DIR_FS_DOWNLOAD .

$downloads['orders_products_filename']));

 

 

Any help or thoughts that can be offered would be great.

Share this post


Link to post
Share on other sites

Please disregard this has been fixed...

 

Evidently when I upgraded my server and files were moved there was some whitespaces added into the end of some files..

 

I just went thru all files for OsCommerce and made sure no files has any extra lines or spaces at the end of the files... Very annoying little task but that did solve everything...

Share this post


Link to post
Share on other sites
Yes. The osCommerce PayPal IPN module takes over all the jobs in checkout_process.php, there for you need to apply the modification in checkout_process.php to your paypal_ipn.php, otherwise it won't work.

 

Which version of the osCommerce PayPal IPN you're using?

 

I'm using Paypal IPN v2.3.3 and having trouble figuring out what to do for this step. The code is very different between the two files so I'm not sure where to copy the modified code to. Are there more detailed instructions on how to do this somewhere?

 

paypal_ipn.php just has a bunch of define statements, but checkout_process.php sets up an array and has an if/else statement nested within another if statement which is outside the modified code.

 

Can you help clarify what I need to do?

Share this post


Link to post
Share on other sites

I hope this is the correct thread to ask this question.

This must have been asked a ton of times. But I couldn't find a solution to my situation.

 

I installed Super Download Shop v1.1, by copying all the files and making the necessary modifications (read checkout_process.php).

I used both Filemerge on mac os x and Winmerge on windows, both to no avail.

Now everytime I complete a transaction I get a "download expired" with the expiration date being set on the day of purchase with zero downloads left.

When I replace the modified checkout_process.php with the original one, the expiration date for the download is set on Thursday, 01 January 1970 :huh: and I'm also unable to download.

 

What am I doing wrong?

 

I hope someone can help me.

Share this post


Link to post
Share on other sites
have you checked download settings in admin?

 

Example

Expiry delay (days) 7

Maximum number of downloads 5

 

Yes I have, they are set on the default settings of 7 days delay and 5 downloads maximum.

When I set the Expiry delay to 0 (no delay) it still gives me 0 downloads.

Share this post


Link to post
Share on other sites
You can set download max day to zero globally or specifically for each download, which will disable download expiration, but you cannot set max download count to zero, neither globally nor specifically. Please check the attributes settings about the max download count for each download.

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.

Share this post


Link to post
Share on other sites

Hi,

 

I just installed this contribution and it works great! I had been using the original Downloads Controller up until now and it was terrific, but I do appreciate the added features of this one.

 

I am using ccgv(trad) with this contribution and they both work together very well as long as there is a positive final order total that gets passed to a payment module. Downloads are available immediately at checkout if they have been appropriately paid for.

 

There is only a problem when a voucher or coupon brings the order total down to 0.00. In that case, all payment modules are bypassed (normal behavior) and although my order is processed properly in most respects, it appears as if there is no call anywhere to update the status of the order. Obviously, downloads availability depends on the order status being updated, so I'm wondering if you have any ideas? Is this a common problem or did I just have something wrong?

 

So if someone applies a voucher and their subsequent order total is even as little as $0.01, and they pay with credit card, etc., then their download is waiting.

 

But, if someone applies a voucher that completely covers their purchase, and order total is 0.00, the order is processed but the download remains pending. It's skipping the payment modules, so therefore missing out on the payment module's updating!

 

I see earlier that someone asked a similar question and you were going to take a look at the ccgv(trad) code. I did query Vger about this issue, but so far have not found a solution.

 

Do you think somewhere in checkout_ process I could insert an "update status if order total =0" kind of statement?

 

Any pointing in the right direction is appreciated.

 

Thanks much, Patty

Share this post


Link to post
Share on other sites
You can set download max day to zero globally or specifically for each download, which will disable download expiration, but you cannot set max download count to zero, neither globally nor specifically. Please check the attributes settings about the max download count for each download.

 

Sorry for the misunderstanding.

What I meant to say is it gives me 0 downloads at the download link, the maximum download count is set to 5 .

I never touched the max download count, not globally nor specifically.

I only have one pdf file set up for download.

 

Thanks for your help :) .

Edited by thorn101

Share this post


Link to post
Share on other sites
CCGV bypasses payment modules if the order amount is totally covered, but it doesn't handle orders status and leaves it as default. It can be improved by adding some code in checkout_process.php right after this line:
  $payment_modules->before_process();

And add an IF statement like:

  if ($credit_covers) $order->info['order_status'] = 11;

In this code sample the orders_status_id is hard coded as 11, you might need to adjust this value to meet your settings for the orders to get instant download access.

 

Do you mean the download count always shown as zero in checkout_success.php and account_history_info.php whenever the downloads.php module is called? If you can see the list of downloads but each and everyone has download count shown as zero, then you have something wrong in your includes/modules/downloads.php

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.

Share this post


Link to post
Share on other sites
CCGV bypasses payment modules if the order amount is totally covered, but it doesn't handle orders status and leaves it as default. It can be improved by adding some code in checkout_process.php right after this line:

CODE

$payment_modules->before_process();

And add an IF statement like:

CODE

if ($credit_covers) $order->info['order_status'] = 11;

In this code sample the orders_status_id is hard coded as 11, you might need to adjust this value to meet your settings for the orders to get instant download access.

 

Well, thank you Alex! That seems to do it. I'm going to test it further in several different scenarios, but it is working fine so far.

When the voucher covers the entire order total and brings it to 0.00, my downloads are happily waiting at checkout_success for me.

 

I don't know if it makes any difference, but my checkout_process is slightly reordered from the stock (a fix to pass ccgv(trad) variables correctly to my payment module). So this:

  $payment_modules->before_process();

 

is located AFTER this code:

  require(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;

 $order_totals = $order_total_modules->process();

 

instead of BEFORE that code. Do you foresee any issues?

 

I'll keep testing over the next couple of days and let you know if all is working well. What a great mind you have.

 

Thanks again, Patty

Share this post


Link to post
Share on other sites
I was referring the CCGV modified checkout_process.php there for you're doing fine, no worry.

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.

Share this post


Link to post
Share on other sites

I'm using Paypal IPN v2.3.3 and having trouble with adding the checkout_process.php code into the paypal_ipn.php code. Are there more detailed instructions on how to do this somewhere, or an example?

Share this post


Link to post
Share on other sites
Answered this one in this post. Try to use the search topic function (near the bottom of this page) next time and you might get your answers without waiting.

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.

Share this post


Link to post
Share on other sites
Do you mean the download count always shown as zero in checkout_success.php and account_history_info.php whenever the downloads.php module is called? If you can see the list of downloads but each and everyone has download count shown as zero, then you have something wrong in your includes/modules/downloads.php

 

I have merged with Winmerge the modified downloads.php that comes with Super Download Store and the downloads.php file in includes/modules/

But I still get the same problem. I don't know which module is called when exactly :huh:

When a purchase is finished and download is autorised (Download now available), it says:

 

Download Links: E-Book //this is supposed to be the link

Link Expires on: "Put here todays date" //here the date of the purchase is shown (in my case todays date since I tested it just now.)

0 downloads left // I think this one is explains it self :)

 

 

 

 

 

Thanks

Edited by thorn101

Share this post


Link to post
Share on other sites
Check this block of code in your checkout_process.php:
// BOF Super Download Shop v1.0 mod
	  if (DOWNLOADS_CONTROLLER_FILEGROUP_STATUS != 'Yes' || !strstr($attributes_values['products_attributes_filename'], 'Group_Files-')) {
		$sql_data_array = array('orders_id' => $insert_id, 
								'orders_products_id' => $order_products_id, 
								'orders_products_filename' => $attributes_values['products_attributes_filename'], 
								'download_maxdays' => $attributes_values['products_attributes_maxdays'], 
								'download_count' => $attributes_values['products_attributes_maxcount']);
		tep_db_perform(TABLE_ORDERS_PRODUCTS_DOWNLOAD, $sql_data_array);
	  } else {
		$filegroup_array = explode('Group_Files-', $attributes_values['products_attributes_filename']);
		$filegroup_id = $filegroup_array[1];
		$groupfiles_query = tep_db_query("select download_group_filename
										  from " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD_GROUPS_FILES . "
										  where download_group_id = '" . (int)$filegroup_id . "'");
		while ($groupfile_array = tep_db_fetch_array($groupfiles_query)) {
		  $sql_data_array = array('orders_id' => $insert_id, 
								  'orders_products_id' => $order_products_id, 
								  'orders_products_filename' => $groupfile_array['download_group_filename'], 
								  'download_maxdays' => $attributes_values['products_attributes_maxdays'], 
								  'download_count' => $attributes_values['products_attributes_maxcount']);
		  tep_db_perform(TABLE_ORDERS_PRODUCTS_DOWNLOAD, $sql_data_array);
		}
	  }
// EOF Super Download Shop v1.0 mod


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.

Share this post


Link to post
Share on other sites

Hi, i did installed this contrib 2 weeks ago and it was working nice. since then i have been triyng to make the paypal ipn works (btw its working fine now). but now i make a test of a complete order, and everything goes ok until the customer should see the download link: the button is not showing now... (but should be there, i mean the "download links" text is showing, as well as the products name, the expiry date and all this... just the button is missing...). so now i have no idea what could i have changed that broke it...

could you point me to where the error could be? i mean, what php(s) should i look to find if something is wrong?

thanks in advance Alex

Share this post


Link to post
Share on other sites

I have a couple of questions about this mod before I attempt to install it...

 

I'm running a download store for flight simulator addons and I'm hoping to be able to offer subscription packages that I can add files to the package as the product line is expanded...

 

Is it possible to add files to the directory and have them update on the order page for previously ordered bundles?

 

e.g.

 

* User A buys on Jan 1, the files a.zip, b.zip and c.zip are available (all in downloads/packagea folder)

* Jan 5 the seller adds d.zip and e.zip to the downloads/packagea folder....

 

Will user A be able to see the new files if they log back in or would I need to develop a process to update all previous orders within the sql database?

 

 

My next question is based on reading some other posts here... Is it possible to have *.exe's for the files available in the download directory with SDS?

 

My final question is file size limitations... My files are typically 300mb - 1.5GB... Would SDS work with these files and if so what configuration would you recommend? I often use freedownloadmanager available at cnets download site...

 

Thanks in advance for your help...

 

Oh one final question... I've seen two stores that have 'download' in their options with a file size listed next to the delivery options box... Does SDS add file size data to that box?

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

×