{"id":2031,"date":"2007-08-11T23:55:43","date_gmt":"2007-08-12T05:55:43","guid":{"rendered":"http:\/\/www.conradaskland.com\/blog\/2007\/08\/oscommerce-download-fix-for-link-and-expire\/"},"modified":"2007-08-12T00:17:31","modified_gmt":"2007-08-12T06:17:31","slug":"oscommerce-download-fix-for-link-and-expire","status":"publish","type":"post","link":"https:\/\/conradaskland.com\/blog\/oscommerce-download-fix-for-link-and-expire\/","title":{"rendered":"OsCommerce Download &#8211; Fix for Link and Expire"},"content":{"rendered":"<p> OsCommerce 2.2 Download Mod &#8211; Problems with:<\/p>\n<ol>\n<li>Download Expires Tuesday December 1999&#8243;<\/li>\n<li>Download link not showing (not clickable linking &#8211; no link) after approval of payment.<\/li>\n<\/ol>\n<p>I&#8217;m posting this here off the support forums because the search functions wouldn&#8217;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.<\/p>\n<p>Within download.php in modules I changed the following:<\/p>\n<p>FROM:<\/p>\n<p>$downloads_query = tep_db_query(&#8220;select o.orders_status, date_format(o.last_modified, &#8216;%Y-%m-%d&#8217;) 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 &#8221; . TABLE_ORDERS . &#8221; o, &#8221; . TABLE_ORDERS_PRODUCTS . &#8221; op, &#8221; . TABLE_ORDERS_PRODUCTS_DOWNLOAD . &#8221; opd where o.customers_id = &#8216;&#8221; . (int)$customer_id . &#8220;&#8216; and o.orders_status &gt;= &#8216;&#8221; . DOWNLOADS_CONTROLLER_ORDERS_STATUS . &#8220;&#8216; and o.orders_id = &#8216;&#8221; . (int)$last_order . &#8220;&#8216; and o.orders_id = op.orders_id and op.orders_products_id = opd.orders_products_id and opd.orders_products_filename != &#8221;&#8221;);<\/p>\n<p>TO:<\/p>\n<p>$downloads_query = tep_db_query(&#8220;select o.orders_status, date_format(o.date_purchased, &#8216;%Y-%m-%d&#8217;) 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 &#8221; . TABLE_ORDERS . &#8221; o, &#8221; . TABLE_ORDERS_PRODUCTS . &#8221; op, &#8221; . TABLE_ORDERS_PRODUCTS_DOWNLOAD . &#8221; opd where o.customers_id = &#8216;&#8221; . (int)$customer_id . &#8220;&#8216; and o.orders_status &gt;= &#8216;&#8221; . DOWNLOADS_CONTROLLER_ORDERS_STATUS . &#8220;&#8216; and o.orders_id = &#8216;&#8221; . (int)$last_order . &#8220;&#8216; and o.orders_id = op.orders_id and op.orders_products_id = opd.orders_products_id and opd.orders_products_filename != &#8221;&#8221;);<\/p>\n<p>Its actually a very small change: Within the quiry I changed &#8220;o.last_modified&#8221; to &#8220;o.date_purchased&#8221;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>OsCommerce 2.2 Download Mod &#8211; Problems with: Download Expires Tuesday December 1999&#8243; Download link not showing (not clickable linking &#8211; no link) after approval of payment. I&#8217;m posting this here off the support forums because the search functions wouldn&#8217;t allow me to search and find this fix, I had to find it on Google. Assuming [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":""},"categories":[6],"tags":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3C0LX-wL","_links":{"self":[{"href":"https:\/\/conradaskland.com\/blog\/wp-json\/wp\/v2\/posts\/2031"}],"collection":[{"href":"https:\/\/conradaskland.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/conradaskland.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/conradaskland.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/conradaskland.com\/blog\/wp-json\/wp\/v2\/comments?post=2031"}],"version-history":[{"count":0,"href":"https:\/\/conradaskland.com\/blog\/wp-json\/wp\/v2\/posts\/2031\/revisions"}],"wp:attachment":[{"href":"https:\/\/conradaskland.com\/blog\/wp-json\/wp\/v2\/media?parent=2031"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/conradaskland.com\/blog\/wp-json\/wp\/v2\/categories?post=2031"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/conradaskland.com\/blog\/wp-json\/wp\/v2\/tags?post=2031"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}