Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

it's pretty simple,

BACK UP FIRST.

 

even if you are using paypal ipn

 

in i think it's catalog/includes/modules/downloads.php

 

you need to find this code

 

 

 

// Now get all downloadable products in that order

 $downloads_query_raw = "SELECT DATE_FORMAT(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 customers_id = '" . $customer_id . "'

                         AND o.orders_id = '" . $last_order . "'

                         AND op.orders_id = '" . $last_order . "'

                         AND opd.orders_products_id=op.orders_products_id

                         AND opd.orders_products_filename<>''";

 

 

 

if you are using the paypal ipn (i haven't tested it for anything other than for the new snapshot), then you need to replace it with this

 

 

// Now get all downloadable products in that order

 $downloads_query_raw = "SELECT DATE_FORMAT(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 customers_id = '" . $customer_id . "'

                         AND o.orders_status >= '2'

                         AND o.orders_status != 99999

                         AND o.orders_id = '" . $last_order . "'

                         AND op.orders_id = '" . $last_order . "'

                         AND opd.orders_products_id=op.orders_products_id

                         AND opd.orders_products_filename<>''";

 

 

if you are not using the paypal ipn, but you want to control downloads. I'm not sure how useful this is gonna be to you, but at this same area, put this

 

// Now get all downloadable products in that order

 $downloads_query_raw = "SELECT DATE_FORMAT(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 customers_id = '" . $customer_id . "'

                         AND o.orders_status >= '2'

                         AND o.orders_id = '" . $last_order . "'

                         AND op.orders_id = '" . $last_order . "'

                         AND opd.orders_products_id=op.orders_products_id

                         AND opd.orders_products_filename<>''";

 

all that's gonna do is make sure that the process is 'pending' before it allows the download to be available.

 

 

BE SURE TO BACK UP FIRST. let me know how it works.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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...