Jump to content
Latest News: (loading..)
Spelly

Reactivate or renew orders

Recommended Posts

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? 

 

Share this post


Link to post
Share on other sites

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

 

Find information about the bootstrap community version here

 

Make it idiot proof and someone will make a better idiot.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×