Spelly Posted September 11, 2017 Share Posted September 11, 2017 Hello, I have OSC 2.3. When I have an order and the customer forgets to download the files within the time limit, how can I reactivate his download? Link to comment Share on other sites More sharing options...
♥14steve14 Posted September 11, 2017 Share Posted September 11, 2017 There was an older addon that did this for the number of downloads but not the date. I altered the code on my store and have something that works. This is for the BS admin on the orders page. In page admin - orders after $order_updated = false; $check_status_query = tep_db_query("select customers_name, customers_email_address, orders_status, date_purchased from orders where orders_id = '" . (int)$oID . "'"); $check_status = tep_db_fetch_array($check_status_query); add // Added by Erick Cedano Reset download count if ($HTTP_POST_VARS['reset_download'] == 'on') { $order_updated = true; $comments = ENTRY_RESET_DOWNLOAD_COMMENT; tep_db_query("update " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " set download_maxdays = '" . DOWNLOAD_MAX_DAYS . "', download_count = '" . DOWNLOAD_MAX_COUNT . "' where orders_id = '" . (int)$oID . "'"); } Then where the checkboxes are at the bottom of the page you need to find Find <td class="main"><strong><?php echo ENTRY_NOTIFY_CUSTOMER; ?> <?php echo tep_draw_checkbox_field('notify', '', true); ?></td> <td class="main"><strong><?php echo ENTRY_NOTIFY_COMMENTS; ?></strong> <?php echo tep_draw_checkbox_field('notify_comments', '', true); ?></td> Replace with <td class="main"><strong><?php echo ENTRY_NOTIFY_CUSTOMER; ?> <?php echo tep_draw_checkbox_field('notify', '', true); ?></td> <td class="main"><strong><?php echo ENTRY_NOTIFY_COMMENTS; ?></strong> <?php echo tep_draw_checkbox_field('notify_comments', '', true); ?></td> <td class="main"><strong><?php echo ENTRY_RESET_DOWNLOAD_COUNT; ?></strong> <?php echo tep_draw_checkbox_field('reset_download', '', false); ?></td> To update the download count and the date just check the box and click the UPDATE button. I think thats all I did. If you find the original addon, the code should be similar. REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
Spelly Posted September 11, 2017 Author Share Posted September 11, 2017 Oh thanks, I will take a look! I just thought, there exists an implantation in OSC. :) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.