Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Easily Add Admin Comments


Marg

Recommended Posts

Posted

I am constantly writing the same thing over and over when updating the order status for our customers and it's getting old. I added a checkbox area that works to insert info into the comments area automatically upon ticking a checkbox.

To have one of your own:

 

You need to add the following before the </head> in your orders.php in admin.

 

 

<script LANGUAGE="JavaScript">

function Doit(frmobj)

{

frmobj.comments.value=""

for(i=0;i<frmobj.ckb.length;i++)

{

if(frmobj.ckb.checked)

{frmobj.comments.value+=frmobj.ckb.value}

}

}

</SCRIPT>

 

Next on the same page do a search for

<?php echo tep_draw_textarea_field('comments', 'soft', '60', '5'); ?>

 

Replace that code with:

<table border="0" cellpadding="2" cellspacing="0">

<tr>

<td><INPUT TYPE="checkbox" NAME="ckb" VALUE="Thank you for your order. Your order was shipped via US Post Office" onClick="Doit(this.form)"></td>

<td class="smalltext">Shipped Message</td>

</tr>

<tr>

<td><INPUT TYPE="checkbox" NAME="ckb" VALUE="We are prepared to ship your order, however, your credit card has been declined. Please log into your account and update your credit card information. Thank you" onClick="Doit(this.form)"></td>

<td class="smalltext">CC Declined Message - Must select Need New Credit Card</td>

</tr>

<tr>

<td><INPUT TYPE="checkbox" NAME="ckb" VALUE="an away message" onClick="Doit(this.form)"></td>

<td class="smalltext">Away Message</td>

</tr>

</table><br><?php echo tep_draw_textarea_field('comments', 'soft', '60', '5'); ?>

Personalize the messages for your site.

Hope others find this handy

Marg

 

Here's what it looks like:

 

easycomments.gif

  • 9 months later...
Posted

Great contrib. It would be even nicer if it was "dynamic" and new templates and text could be added via the UI ;)

Posted

This does pretty much the same. You may want to integrate it for dynamic comments :)

Archived

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

×
×
  • Create New...