View Single Post
  #6  
Old 11-14-2007, 10:43 AM
 
Lukas Lukas is offline
 

Member
  
Join Date: Oct 2007
Posts: 23
 

Default Re: "Customer notes" access..

Quote:
Originally Posted by balinor
sorry, it is checkout_notes.tpl

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>&nbsp;</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
Reply With Quote