| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
"Customer notes" access.. | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
"Customer notes" access..
Hello! I'd like to attach a date picker to the "Customer notes" on the "Check-out" page. Can anybody tell me which file I need to modify? Is it dialog_message.tpl or dialog.tpl? Thank you!
__________________
Version 4.1.9 |
|||||||
#2
|
|||||||
|
|||||||
Re: "Customer notes" access..
It is customer/main/customer_notes.tpl.
Moving to template editing.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
Re: "Customer notes" access..
I don't have this file but I found "order_message.tpl" - is this the correct file?
Thank you!
__________________
Version 4.1.9 |
|||||||
#4
|
|||||||
|
|||||||
Re: "Customer notes" access..
sorry, it is checkout_notes.tpl
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#5
|
|||||||
|
|||||||
Re: "Customer notes" access..
Thanks a lot!!
__________________
Version 4.1.9 |
|||||||
#6
|
|||||||
|
|||||||
Re: "Customer notes" access..
Quote:
Hello Padraic, Thank you so much for your hint! I tried to implement a date picker but I get the following response. The code is attached. Any idea what my problem is? Your help is really appreciated! ~Jahn Error: Smarty error: [in customer/main/checkout_notes.tpl line 14]: syntax error: unrecognized tag: minuteDropDownInterval:10,numberOfRowsInHourDropDo wn:5,callbackFunctionOnDayClick:'getDateFromCalend ar',isDragable:true,displayTimeBar:true (Smarty_Compiler.class.php, line 436) in /home/madhatca/public_html/xcart/Smarty-2.6.12/Smarty.class.php on line 1095 {* $Id: checkout_notes.tpl,v 1.6 2005/12/07 14:07:21 max Exp $ *} {include file="customer/main/subheader.tpl" title=$lng.txt_notes class="grey"} <link rel="stylesheet" href="{$SkinDir}/cal-2/demos.css" media="screen" type="text/css"> <script type="text/javascript" src="{$SkinDir}/cal-2/dhtmlSuite-common.js"></script> <script language="javascript" type="text/javascript" src="{$SkinDir}/cal-2/dhtmlSuite-calendar.js"></script> <script language="javascript" type="text/javascript" src="{$SkinDir}/cal-2/dhtmlSuite-dragDropSimple.js"></script> <link type="text/css" media="screen" rel="stylesheet" href="{$SkinDir}/cal-2/calendar.css"> <!-- A DATE PICKER FOR FORMS --> <script type="text/javascript"> var calendarObjForForm = new DHTMLSuite.calendar({minuteDropDownInterval:10,num berOfRowsInHourDropDown:5,callbackFunctionOnDayCli ck:'getDateFromCalendar',isDragable:true,displayTi meBar:true}); calendarObjForForm.setCallbackFunctionOnClose('myO therFunction'); function myOtherFunction() { } function pickDate(buttonObj,inputObject) { calendarObjForForm.setCalendarPositionByHTMLElemen t(inputObject,0,inputObject.offsetHeight+2); // Position the calendar right below the form input calendarObjForForm.setInitialDateFromInput(inputOb ject,'yyyy-mm-dd hh:ii'); // Specify that the calendar should set it's initial date from the value of the input field. calendarObjForForm.addHtmlElementReference('myDate ',inputObject); // Adding a reference to this element so that I can pick it up in the getDateFromCalendar below(myInput is a unique key) if(calendarObjForForm.isVisible()){ calendarObjForForm.hide(); }else{ calendarObjForForm.resetViewDisplayedMonth(); // This line resets the view back to the inital display, i.e. it displays the inital month and not the month it displayed the last time it was open. calendarObjForForm.display(); } } /* inputArray is an associative array with the properties year month day hour minute calendarRef - Reference to the DHTMLSuite.calendar object. */ function getDateFromCalendar(inputArray) { var references = calendarObjForForm.getHtmlElementReferences(); // Get back reference to form field. references.myDate.value = inputArray.year + '-' + inputArray.month + '-' + inputArray.day + ' ' + inputArray.hour + ':' + inputArray.minute; calendarObjForForm.hide(); } </script> <table cellspacing="0" cellpadding="2"> <tr valign="top"> <td>{$lng.lbl_customer_notes}:</td> <td> </td> <td nowrap="nowrap"><textarea cols="70" rows="10" name="Customer_Notes" onclick="" type="text"></textarea></td> <td><input value="Pick-up date/time" onclick="pickDate(this,document.forms[0].myDate);" type="button"></td> </tr> </table>
__________________
Version 4.1.9 |
|||||||
#7
|
|||||||
|
|||||||
Re: "Customer notes" access..
If you are using JavaScript in X-Cart, you need to surround it with {literal} tags so Smarty doesn't try to read it:
{literal} javascript code here {/literal}
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#8
|
|||||||
|
|||||||
Re: "Customer notes" access..
I followed your advice. The error message is gone. But the calender function doesn't work although it works standalone in html.
Thanks for your great support!
__________________
Version 4.1.9 |
|||||||
#9
|
|||||||
|
|||||||
Re: "Customer notes" access..
Quote:
Hi Padraic! Can you think of any reason why my script won't work? Thank you. ~Jahn
__________________
Version 4.1.9 |
|||||||
#10
|
|||||||
|
|||||||
Re: "Customer notes" access..
Sorry, JS is not my specialty
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
|
|||
X-Cart forums © 2001-2020
|