Marg Posted February 15, 2006 Posted February 15, 2006 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:
Jakub01 Posted December 13, 2006 Posted December 13, 2006 Its very usefull hack. Can be this used with variable, such as with tracking numer ? Like: "Your order was shipped with number $track_nr You can track it on http://shipping.site/find-packet=$track_nr
Guest Posted December 14, 2006 Posted December 14, 2006 Great contrib. It would be even nicer if it was "dynamic" and new templates and text could be added via the UI ;)
Guest Posted December 14, 2006 Posted December 14, 2006 This does pretty much the same. You may want to integrate it for dynamic comments :)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.