Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

"Customer notes" access..

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-12-2007, 10:45 AM
 
Lukas Lukas is offline
 

Member
  
Join Date: Oct 2007
Posts: 23
 

Question "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
Reply With Quote
  #2  
Old 11-12-2007, 10:57 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: "Customer notes" access..

It is customer/main/customer_notes.tpl.

Moving to template editing.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 11-12-2007, 11:09 AM
 
Lukas Lukas is offline
 

Member
  
Join Date: Oct 2007
Posts: 23
 

Default 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
Reply With Quote
  #4  
Old 11-12-2007, 11:15 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: "Customer notes" access..

sorry, it is checkout_notes.tpl
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 11-12-2007, 11:21 AM
 
Lukas Lukas is offline
 

Member
  
Join Date: Oct 2007
Posts: 23
 

Default Re: "Customer notes" access..

Thanks a lot!!
__________________
Version 4.1.9
Reply With Quote
  #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
  #7  
Old 11-14-2007, 10:46 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default 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
Reply With Quote
  #8  
Old 11-14-2007, 10:53 AM
 
Lukas Lukas is offline
 

Member
  
Join Date: Oct 2007
Posts: 23
 

Default 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
Reply With Quote
  #9  
Old 11-14-2007, 01:08 PM
 
Lukas Lukas is offline
 

Member
  
Join Date: Oct 2007
Posts: 23
 

Default Re: "Customer notes" access..

Quote:
Originally Posted by balinor
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}

Hi Padraic!
Can you think of any reason why my script won't work?
Thank you. ~Jahn
__________________
Version 4.1.9
Reply With Quote
  #10  
Old 11-14-2007, 03:29 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: "Customer notes" access..

Sorry, JS is not my specialty
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:38 PM.

   

 
X-Cart forums © 2001-2020