OsCommerce 2.2 Download Mod – Problems with:
- Download Expires Tuesday December 1999″
- Download link not showing (not clickable linking – no link) after approval of payment.
I’m posting this here off the support forums because the search functions wouldn’t allow me to search and find this fix, I had to find it on Google. Assuming others are doing the same, here it is. Keyword help to find this: Osc MS2, Super Download Mod, error, problem, downloads expiry, no link not showing unable to download.
Within download.php in modules I changed the following:
FROM:
$downloads_query = tep_db_query(“select o.orders_status, date_format(o.last_modified, ‘%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 o.customers_id = ‘” . (int)$customer_id . “‘ and o.orders_status >= ‘” . DOWNLOADS_CONTROLLER_ORDERS_STATUS . “‘ and o.orders_id = ‘” . (int)$last_order . “‘ and o.orders_id = op.orders_id and op.orders_products_id = opd.orders_products_id and opd.orders_products_filename != ””);
TO:
$downloads_query = tep_db_query(“select o.orders_status, date_format(o.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 o.customers_id = ‘” . (int)$customer_id . “‘ and o.orders_status >= ‘” . DOWNLOADS_CONTROLLER_ORDERS_STATUS . “‘ and o.orders_id = ‘” . (int)$last_order . “‘ and o.orders_id = op.orders_id and op.orders_products_id = opd.orders_products_id and opd.orders_products_filename != ””);
Its actually a very small change: Within the quiry I changed “o.last_modified” to “o.date_purchased”.
this is really help! it work.
thanks you for the tips! 🙂