Jump to content
Sign in to follow this  
Ajeh

[Contribution] Downloads Controller v5.3 with Free Ship/Pay

Recommended Posts

The main purpose of it is for when you accept multiple forms of payment and do not want to always immediately make available a download based on the payment module used.

It also provides the ability to give things away for free or to give free shipping on products without weight when they are the only thing in the cart.

For some it is handy, others don't need it ... :D

 

Hiya, I have installed the mod that you are talking about but i still cant get access to downloads, i dont see a download button anywhere nor do they come in the order email for the customer. Any thoughts? I have 5 sites that i need to use this for and it is really the only thing that is holding the completion up.

 

I am also getting this error in admin>customers>orders

 

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'limit 0, 20' at line 1

 

select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from orders o left join orders_total ot on (o.orders_id = ot.orders_id), orders_status s where o.orders_status = s.orders_status_id and s.language_id = '1' and ot.class = 'ot_total' order by limit 0, 20

 

thnks

tanya

Edited by tec

Share this post


Link to post
Share on other sites
You have no idea how relieved I was to see that "Download your products here" section!!!!

 

what page is this supposed to show up on?

I am not getting any of my downloads to work, and i have followed everything in this thread.

Please help, my head hurts :'(

Share this post


Link to post
Share on other sites
Hiya, I have installed the mod that you are talking about but i still cant get access to downloads, i dont see a download button anywhere nor do they come in the order email for the customer. Any thoughts? I have 5 sites that i need to use this for and it is really the only thing that is holding the completion up.

 

I am also getting this error in admin>customers>orders

 

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'limit 0, 20' at line 1

 

select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from orders o left join orders_total ot on (o.orders_id = ot.orders_id), orders_status s where o.orders_status = s.orders_status_id and s.language_id = '1' and ot.class = 'ot_total' order by limit 0, 20

 

thnks

tanya

 

The following will sort out the error

 

Steve

 

 

In /admin/orders.php, find this line, near the top:

 

CODE

$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

 

 

Above that, add:

 

CODE

if($HTTP_GET_VARS['listing']=="customers") { $sort_by = "o.customers_name"; }

elseif($HTTP_GET_VARS['listing']=="customers-desc") { $sort_by = "o.customers_name DESC"; }

elseif($HTTP_GET_VARS['listing']=="ottotal") { $sort_by = "order_total"; }

elseif($HTTP_GET_VARS['listing']=="ottotal-desc") { $sort_by = "order_total DESC"; }

elseif($HTTP_GET_VARS['listing']=="id-asc") { $sort_by = "o.orders_id"; }

elseif($HTTP_GET_VARS['listing']=="id-desc") { $sort_by = "o.orders_id DESC"; }

elseif($HTTP_GET_VARS['listing']=="status-asc") { $sort_by = "o.orders_status"; }

elseif($HTTP_GET_VARS['listing']=="status-desc") { $sort_by = "o.orders_status DESC"; }

else { $sort_by = "o.orders_id DESC"; }

 

 

Then, go way down and find the block that starts:

 

CODE

if (isset($HTTP_GET_VARS['cID'])) {

$cID = tep_db_prepare_input($HTTP_GET_VARS['cID']);

$orders_query_raw = "select o.orders_id, .................

 

 

Change all three instances of:

 

CODE

order by $orders";

 

to

 

CODE

order by " . $sort_by;

Share this post


Link to post
Share on other sites
The following will sort out the error

 

Steve

 

 

In /admin/orders.php, find this line, near the top:

 

CODE

$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

Above that, add:

 

CODE

if($HTTP_GET_VARS['listing']=="customers") { $sort_by = "o.customers_name"; }

elseif($HTTP_GET_VARS['listing']=="customers-desc") { $sort_by = "o.customers_name DESC"; }

elseif($HTTP_GET_VARS['listing']=="ottotal") { $sort_by = "order_total"; }

elseif($HTTP_GET_VARS['listing']=="ottotal-desc") { $sort_by = "order_total DESC"; }

elseif($HTTP_GET_VARS['listing']=="id-asc") { $sort_by = "o.orders_id"; }

elseif($HTTP_GET_VARS['listing']=="id-desc") { $sort_by = "o.orders_id DESC"; }

elseif($HTTP_GET_VARS['listing']=="status-asc") { $sort_by = "o.orders_status"; }

elseif($HTTP_GET_VARS['listing']=="status-desc") { $sort_by = "o.orders_status DESC"; }

else { $sort_by = "o.orders_id DESC"; }

Then, go way down and find the block that starts:

 

CODE

if (isset($HTTP_GET_VARS['cID'])) {

    $cID = tep_db_prepare_input($HTTP_GET_VARS['cID']);

    $orders_query_raw = "select o.orders_id, .................

Change all three instances of:

 

CODE

order by $orders";

 

to

 

CODE

order by " . $sort_by;

 

 

thank you Steve, the error is no longer in the admin now. Now, if I could figure out why no download link is getting sent in the email, or even a download button, i would be good to go.

Share this post


Link to post
Share on other sites

Does it work with authorize.net?

I have authorize.net and COD (cod for testing) and not only do the downloads not show but the authorize.net does not come up as a payment option

 

please help..it hurts :'(

Share this post


Link to post
Share on other sites

I have DC working fine when I use the downloads directory.

When I try and use the redirect function I get the dreaded 404. The pub directory is set to 777 and when I look at the pub folder in an FTP prog I can see the new subfolder in there.

I have given the download a value of zero to eliminate any issues that might be caused by payment modules.

 

I have no problems if the redirect is set to false

 

Any suggestions

 

Steve

Share this post


Link to post
Share on other sites
thank you Steve, the error is no longer in the admin now. Now, if I could figure out why no download link is getting sent in the email, or even a download button, i would be good to go.

 

No download link is sent in the email. The download link should show on the final page of the checkout sequence or via "My account"

 

First is a file showing at all on the final page preferably as a hyper link?

 

Couple of things to check If you have set to download via redirect in admin, downloads then make sure the pub directory is set to 777.

 

If you have not set redirect to true then make sure the downloads dir is set to 777

 

Is the file path correct, no spaces in the file name (use underscore if there are gaps).

 

Expt using a zero cost item with the WEb Master Corners Free credit card installed

 

See if there's any change after trying the above

 

Steve

Share this post


Link to post
Share on other sites
No download link is sent in the email. The download link should show on the final page of the checkout sequence or via "My account"

 

First is a file showing at all on the final page preferably as a hyper link?

 

Couple of things to check If you have set to download via redirect in admin, downloads then make sure the pub directory is set to 777.

 

If you have not set redirect to true then make sure the downloads dir is set to 777

 

Is the file path correct, no spaces in the file name (use underscore if there are gaps).

 

Expt using a zero cost item with the WEb Master Corners Free credit card installed

 

See if there's any change after trying the above

 

Steve

 

 

HIya Steve, I have followed all instructions from you, i do not have it set to redirect, i made sure all file permissions were set, the download file is in teh attributes. No attribute options or values, as there are none, just the downloadable file.

Nothing is showing up on my final page except the default text about notification on products. What am i doing wrong, this site is supposed to be going live tomorrow morning along with 3 others like it, but i cant get these downloads to work. I can deal with them not being sent in an email, this is ok, but i am not getting anything. They are not showing up in the 'my account' either :'(

Edited by tec

Share this post


Link to post
Share on other sites
HIya Steve, I have followed all instructions from you, i do not have it set to redirect, i made sure all file permissions were set, the download file is in teh attributes. No attribute options or values, as there are none, just the downloadable file.

Nothing is showing up on my final page except the default text about notification on products. What am i doing wrong, this site is supposed to be going live tomorrow morning along with 3 others like it, but i cant get these downloads to work. I can deal with them not being sent in an email, this is ok, but i am not getting anything. They are not showing up in the 'my account' either :'(

 

Just thought I would share my error.

 

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, last_modified, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, date_purchased, orders_status, comments, currency, currency_value) values ('2', 'Trevor Blackmore', 'DataSound Australia', '17 etc.........')

 

 

[TEP STOP]

This happens when I try to confirm an order. I have read through the entire

post and thought someone might be able to help before I try going through the maze of others posts.

From what I can gather it might be easier to simply delete the contrib all together.

I will try for a little bit longer yet though

Share this post


Link to post
Share on other sites
HIya Steve, I have followed all instructions from you, i do not have it set to redirect, i made sure all file permissions were set, the download file is in teh attributes. No attribute options or values, as there are none, just the downloadable file.

Nothing is showing up on my final page except the default text about notification on products. What am i doing wrong, this site is supposed to be going live tomorrow morning along with 3 others like it, but i cant get these downloads to work. I can deal with them not being sent in an email, this is ok, but i am not getting anything. They are not showing up in the 'my account' either :'(

Tec, If you want me to have a look, PM me the url and admin and I will see if I can see anything obvious....

 

Steve

Share this post


Link to post
Share on other sites

Another hiccup!!

 

There seems to be an inconsistency in the downloads.

 

I have 2 sorts of files for downloads MP3 and FLAC, after purchase both appear on the checkout success page as available downloads. 90% of te time the MP3 files download fine. The other 10% I get a returned error 500.

 

The FLAC files seem to always return an Error 500. Both sets of files are in the same sub folders, so it can't be a question of permissions.

 

I am waiting on an answer from my ISP, but thought that may be a chance someone in the Forums has had a similar problem and might be able to shed some light on the matter

 

Steve

Share this post


Link to post
Share on other sites

After continued testing I have come to the conclusion, that this is a problem caused by the file size.

 

Is there anyone who has downloads of 20mb plus working succesfully with Download Controller?

 

Steve

Share this post


Link to post
Share on other sites

Definitely a size issue as I can download both MP3 and FLAC files up to around 11MB.

 

Somewhere between 11 and 15 and over MB both MP3 and FLAC return a 500 error

 

I have ammended the download.php to grab in "chunks" but this still doesn't seem to sort the problem....

 

Steve

Edited by Sierrab

Share this post


Link to post
Share on other sites
Tec, If you want me to have a look, PM me the url and admin and I will see if I can see anything obvious....

 

Steve

Hi Steve thanks for the reply I will forward the details shortly. I'm experimenting with the new Download controller and will get back to you.

 

Cheers

 

Trev

Share this post


Link to post
Share on other sites

Oh God, another hiccup!!

 

When choosing save file in IE, the download file manager in Explorer thinks the file is called download and has no suffix

 

In Firefox there is no such problem the file saves as "name_of_song.mp3"

 

Anyone had the same problem? And did you find a solution?

 

Steve

Share this post


Link to post
Share on other sites

So as to complete the above thread, the problem was solved by putting all the songs in the download directory, rather than in sub folders of that directory. This also sorted out the problems of file size by allowing me to use "redirect" for downloads.

 

Steve

Share this post


Link to post
Share on other sites

Hi there,

 

got the download controller 5.3 to work finally. But as mentioned in the other posts it works just for files which are up to 2 MB. big.

 

Any files bigger that that won't download.

 

(I had to deactivate the "redirect" option in the admin-konfig-download section since redirect doesn't work on my server (for any purpose i don't understand...))

 

Is there a known fix for people like me (who don't get the redirect to work and have that "file-size-bigger-than-2-MB-Download-problem")

 

Thilo

Share this post


Link to post
Share on other sites
Hi there,

 

got the download controller 5.3 to work finally. But as mentioned in the other posts it works just for files which are up to 2 MB. big.

 

Any files bigger that that won't download.

 

(I had to deactivate the "redirect" option in the admin-konfig-download section since redirect doesn't work on my server (for any purpose i don't understand...))

 

Is there a known fix for people like me (who don't get the redirect to work and have that "file-size-bigger-than-2-MB-Download-problem")

 

Thilo

Check the permissions on the pub and downloads folders, getting big files to d/l with redirect is (for me anyway) easier than direct

 

With direct, you have to get around the limitations of php which can be done but can be time consuming

 

Try replacing in download.php

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

with

$chunksize = 32 * 1024;

$buffer = '';

$handle = fopen(DIR_FS_DOWNLOAD . $downloads['orders_products_filename'], 'rb');

if ($handle === false) { echo 'ERROR...'; die; }

while (!feof($handle)) {

$buffer = fread($handle, $chunksize);

echo $buffer;

}

fclose($handle);

}

 

and see if that helps

 

Steve

Share this post


Link to post
Share on other sites

Hi Sierrab,

 

thanks for your script but i'm still having the same problems...

 

the permissions of the two folders are 755 and 777 (download / pub).

I even have modified the php.ini to increase the "upload_max_filesize" and the "post_max_filesize".

I turned the PHP Safe mode "off".

 

Still the redirect-method won't work at all.

 

And with redirection "False" i still get only files smaller than 2 MB. (even with the changed download.php)

 

 

I am REALLY running out of ideas...

 

Thilo

Share this post


Link to post
Share on other sites

Again me.

 

I tried the redirection method again. Ordered a download. Set the Status in the admin to "updated".

 

And then i took the "putty" tool to look in the pub directory. The was nothing. (i listed the hidden files too). Shoudn't there be a symlink in that directory now?

 

So what does that mean?

 

Redirection of course can't work if there is no symlink in the directory to redirect to... wrong?

 

 

EDIT:

Ok the symlink appears after i click on the download link in the shop... So that's no error.

So if i am in the pub folder and type in putty: cd .xyzxyzxyzxyz (which is the symlink) i find the right file there...

 

But in the shop when i use the link i still have the internal-configuration-error message.

- which means - it is a redirection error, isn't it?

Edited by ThiloS

Share this post


Link to post
Share on other sites

I am offering a free download. It works just fine with DC.

 

I just noticed however that ANY product purchased shows up in the final order screen as well as the users account as a download... and links to the free download.

 

The free download is "Card in Ceiling"

If someone buys "Cups and Balls" the download link will say "Cups and Balls" but links to "Card in Ceiling"

Technology is good, but no one had invented the transporter to download physical merchandise yet.. :)

 

Charge a penny for the download and this doesn't happen.

 

Any Ideas?

Share this post


Link to post
Share on other sites
I am offering a free download. It works just fine with DC.

 

I just noticed however that ANY product purchased shows up in the final order screen as well as the users account as a download... and links to the free download.

 

The free download is "Card in Ceiling"

If someone buys "Cups and Balls" the download link will say "Cups and Balls" but links to "Card in Ceiling"

Technology is good, but no one had invented the transporter to download physical merchandise yet.. :)

 

Charge a penny for the download and this doesn't happen.

 

Any Ideas?

 

 

I've looked throught the setup and I'm pretty sure I have it correct. Free means everyone sees it mislabeled, paid downloads are not affected. I'm really looking for some suggestions.

Share this post


Link to post
Share on other sites

hi, i have a little problem, that maybe someone knows what's wrong.. i've had DC installed and seemd to be working fine.. i can download large files etc.. the problem however is when the download has expired.. if i go to admin and change the status of the order to 4 (updated) so that it re-activates the download link, the download link re-appears (which is fine) but this time, when i click the download link.. i just get taken to a blank page... whereas the download works fine if i've just placed an order or if it hasn't expired...

 

if anyone could help, or even point me in roughly the right direction it would be much appreciated :)

 

ps.. a download is allowed when the order status = 2

i have download re-direct turned off

and search engine urls is off :)

 

kev :)

Edited by kev@num

Share this post


Link to post
Share on other sites

Just a quick note to say that I downloaded Download_Controllerv5.3 MS2.2_1 and it mentions running a sql file:

 

Add the new configuration settings with the downloads_controller.sql file. This will add the new settings for the Admin.

 

...but there is no such file present in the download (I checked all the subdirectories, too, just to be anally complete in looking for it). I might be able to proceed past step 1 if there were that pesky swl file, but nooooooo. Where is it? Is it like UFOs? The fabled downloads_controller.sql file... You know someone who's seen them (or used the file to install) but not you yourelf? *whiney, frustrated, tired voice*

 

If not, what version or file is the correct one that I should download?


--Sanguinarius

 

If you're reading this, I'm probably pulling my hair out. ;>

 

*waiting for osCommerce 3.0 alpha 6* (I'm after the coupons.)

Share this post


Link to post
Share on other sites
Just a quick note to say that I downloaded Download_Controllerv5.3 MS2.2_1 and it mentions running a sql file:

...but there is no such file present in the download (I checked all the subdirectories, too, just to be anally complete in looking for it). I might be able to proceed past step 1 if there were that pesky swl file, but nooooooo. Where is it? Is it like UFOs? The fabled downloads_controller.sql file... You know someone who's seen them (or used the file to install) but not you yourelf? *whiney, frustrated, tired voice*

 

If not, what version or file is the correct one that I should download?

If you go to the contributions and enter download_controller and get this version

Download / Free Ship /Pay v5.3 MS 2.2 Farrukh Saeed

It contains the sql file. Don't worry I had a lot sleepless nights over it as well. You'd think that if someone was going to upload a contribution they would put in everything needed. Anyway this one works

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
Sign in to follow this  

×