Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Reactivate or renew orders


Spelly

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...