Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Create Account and Order Maker


ArtcoInc

Recommended Posts

@@ArtcoInc Hi Malcolm,

 

On the few occasions I have to do this I edit the dates via phpmyadmin in the orders table - seems to work fine

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

@@ArtcoInc Im sure that someone who knew what they were doing (which excludes me) could add a date picker function to the mod.

 

But with developments towards BS etc I would not expect many future updates to this ever so usefull modification

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

@@ArtcoInc

 

Hi Malcolm

 

This is something I was working on a while back and might help you.

 

admin/orders.php

 

FIND:

include(DIR_WS_CLASSES . 'order.php');

ADD BEFORE IT:

// BOF ORDER DATE
if(!empty($_POST["date_purchased"])) {
$oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);
$date_purchased = tep_db_prepare_input($HTTP_POST_VARS['date_purchased']);
tep_db_query(" update " . TABLE_ORDERS . " set date_purchased = '" . tep_db_input($date_purchased) . "', last_modified = now() where orders_id = '" . tep_db_input($oID) . "'");
}
// EOF ORDER DATE

then add the following code there where you want to show/edit the order date.

      <tr>
        <td class="main"><strong><?php echo ORDER_DATE; ?></strong>  <FORM method="POST"><input value="<?php echo tep_date_short($order->info['date_purchased']);?>" name="date_purchased" id="date_purchased"> <?php echo tep_draw_button('Update');?></FORM></td>
      </tr>
<script type="text/javascript">
$('#date_purchased').datepicker({
  dateFormat: 'yy-mm-dd'
});
</script>

admin/includes/languages/english/orders.php

define('ORDER_DATE', 'Order Date:');

As always test this on a local shop before using live. You could add this code somewhere inside the order editor page but I didn't try it there so no clue if it actually works. Inside the orders.php it should work just fine.

Link to comment
Share on other sites

Like I said - needed someone who knew what they were doing.... :)

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...