Hi MrMeech,
On the admin side I tried two java apps - including the one that is used elsewhere in the admin - and could get niether of them to work.
I tried using:
- Bazillyo's Spiffy DHTML Popup Calendar (the one used elsewhere in admin and couldn't get a result at all ??? Couldn't figure this one out, so re-visiting on the weekend after they (hopefully) grant me permission to go into their yahoo group to get more info. http://tech.groups.yahoo.com/group/spiffyDHTML/ The court is out for me on this one.
- http://www.mattkruse.com/javascript/calendarpopup/ - very similar app but a different function to get it to work - however the A HREF="#" function does not work with the forms on the admin side - resets/processes the whole page instead of calling the calendar - so no good here either.
The best way I see this functioning at this point is having the delivery date update work as a java pop-up itself (like some of the other admin contributions use to control 'elements' of the information. This way the list and the java apps may work and neither will have to default to the current delivery date when displayed so admin users won't 'accidentally' update the delivery date to the wrong one.
This is the updated list code, which has some updates to allow our shipping staff to update the delivery date historically, on weekends, etc as they need to do:
<!-- Begin Delivery Date Block -->
<hr>
<strong>Current Delivery Date: </strong><?php echo zen_date_long($order->info['order_delivery_date']); ?><br>
<strong>Reset Delivery Date to: </strong>
<select name="update_order_delivery_date">
<?php
$deliv_date = ($order->info['order_delivery_date']);
for ($i=-30, $n=365; $i < $n; $i++) {
$now[$i] = strtotime ("+$i day", time());
if ( strftime ("%w",$now[$i])<>"12-25"
AND strftime ("%m-%d",$now[$i])<>"12-26"
AND strftime ("%m-%d",$now[$i])<>"01-01"
){
echo '<option value="'.strftime ("%Y-%m-%d",$now[$i]).'">'.strftime ("%d %B %Y (%A)",$now[$i]).'</option>';
}
}
?>
</select>
<?php echo zen_draw_separator('pixel_trans.gif', '50', '1'); ?>
<?php echo zen_image_submit('button_update.gif', IMAGE_UPDATE); ?>
<hr>
<!-- End Delivery Date Block -->
** I have been looking at the php manual and tutorials online and trying to work out how to define the current delivery date and make that the default or selected day on the pull down list - so if the rest of the order is updated on a screen in 'editorders', 'superorder' or another admin contribution then the person updating the rest of the information own't change the delivery date UNLESS they actually change the delivery date pull down list.
** Pulling out my hair trying to get the current delivery date to default on the list, but I am learning quite a bit about php coding in the mean time (I used to run a html web site management company about 10 years ago and have been away from it for years, so have to work out what to do again!!)
So either we can work out how to get the current delivery date to be the default date displayed on the list . . . or . . . we put the list code above in a java popup and see how that goes . . that's my current line of thought at the moment.
Any suggestions or comments??
Thanks, Max
Bookmarks