sabaina Posted April 11, 2006 Share Posted April 11, 2006 a few things: 1. papabruin is right - the sql file is not in either of the packages mentioned in the original post/tutorial. it must be acquired through the "Download / Free Ship /Pay v5.3 MS 2.2 Farrukh Saeed 7 Aug 2003" file. 2. i want my customers to be able to download the file right after they have completed the paypal checkout process. for this, i had to change the `set preparing orders status` to `11 downloads now available`. the download link was still not appearing after they were returned to checkout_success.php. the expiry date for downloads was messed up (showing 19 dec 1999 or some other date in 99). the was also not available under 'my account'. this was happening because the `last_modified` field in the `orders` table was NULL, and that was being used to calculate the expiry date for downloads. i changed catalog/includes/modules/download.php at line 29 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 != ''"); this fix worked for me. however, i think it would be more suitable to set the `last_modified` field equal to `date_purchased` at the time the order information is being saved. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.