Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

TO HELP THOSE WITH DOWNLOAD PROBLEMS


Cyber2000

Recommended Posts

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.

Link to comment
Share on other sites

  • 5 months later...
  • Replies 88
  • Created
  • Last Reply

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!

Link to comment
Share on other sites

  • 2 weeks later...
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.

☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆

Link to comment
Share on other sites

I just found this post on another thread by lee987 on 03 June 2008 .

Maybe this is the solution?? Let me know if this works. I want to use it myself but I'm not swift enough on OsCommerce to get myself out of the Jams I get myself into...

 

 

To prevent download stealing a small mod to /catalog/download.php is required

 

Replace

$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_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 != ''");

 

with

// mod to prevent download stealing

// $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_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 != ''");

$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 != ''");

// end mod to prevent download stealing

 

This does an additional check that order status is 3 (or whatever you have set for payment received). If it does not match then the 'buyer' just sees a blank screen instead of getting access to the download. Instead of

and o.orders_status = '3'

I guess you could use >= '3' or use an or statement.

 

I can't remember where I found this suggestion but it worked for me.

 

I am using IPN along with this.

 

by lee987 on 03 June 2008

Thanks,

Susan

 

 

Proudly uses Oscommerce!

Link to comment
Share on other sites

  • 3 months later...

I am currently setting a up a store which will be selling software. I have products for download as well as physical products. What I would like to know is, is it possible to set up downloads which have different combinations of attributes? For example, I need the user to be able to select the type of license (office/home), and the platform (windows/mac), and to then be able to download the correct file according to these options. I've had a search on the contributions area of the site and haven't found anything which looks like it would allow me to do this...

 

I'd be extremely grateful for any help or suggestions.

 

Thanks,

Emily

Link to comment
Share on other sites

I just found this post on another thread by lee987 on 03 June 2008 .

Maybe this is the solution?? Let me know if this works. I want to use it myself but I'm not swift enough on OsCommerce to get myself out of the Jams I get myself into...

 

 

 

I'd be really interested to know too...it seems like just a small piece of script to use compared to the downloads add ons that I've looked at that may take a while to install and could be tricky...I'd rather have something simple like this, I don't need bells and whistles.. :)

Link to comment
Share on other sites

Hi,

 

I've tried all of this (Configuration, editing the source files, attributes, PayPal, literally every suggestion in this forum) and it's all as it should be yet still not working!

 

I go through PayPal and pay and it takes me back to the shopping cart where I then click "Confirm Order" -

 

The next page just says this:

 

Fatal error: Call to a member function call_api() on a non-object in /(filepath)/checkout_process.php on line 127

 

I haven't changed anything on checkout_process, does anybody get this error?

 

Thanks!

 

:o

 

-- also, forgot to mention my customer order never shows up on the admin panel. PayPal puts it through fine so the error is probably somewhere in checkout_process or checkout_success. Help!!

Link to comment
Share on other sites

Never mind! Within checkout_process there's a call_api in the BuySafe module - since I'm not using BuySafe I just deleted it and now, FINALLY, my cart works! So, probably no help for anyone who IS using BuySafe, but if you're not, and you're getting my error, that's how to fix it. So relieved!

Link to comment
Share on other sites

  • 2 weeks later...

I've read through all these posts and tried the suggestions but am still not getting a download link. I tried:

 

- Setting the attributes to 'download' and 'yes' as suggested

- Checked the filename was entered correctly etc.

- Downloads are enabled in admin and redirects set to false

- Checked the "/" were correct in catalog/includes/configure

 

But it still doesn't work. :'(

 

I tried it using the test credit card - could the problem be with that somehow? Are there some other settings that need to be checked?

 

It's not working for the 'Unrreal Tournament' product either so I'm guessing it's a problem somewhere else, not with the new download I added. but I'm at a loss what to do to get it working. I'm using osc V2.2 RC 2a. Can anyone help?

Link to comment
Share on other sites

Well I got it to work by changing the order status of the category so it wasn't '0''. In case anyone still needs help see this post which gives the fix:

 

http://www.oscommerce.com/forums/topic/272171-download-link-not-showing-fixed/page__gopid__1522179entry1522179

 

See also the knowledge base:

 

http://www.oscommerce.info/confluence/display/OSCDOC22/Orders+Status

 

So it seems that you can set the download link to appear when any one of the status's (of your choosing) is completed. I tried changing the order status to 3 so that it would appear only when the order was set to 'delivered' in admin and it seemed to work. I hope that all makes sense :D

Link to comment
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...