View Single Post
  #1  
Old 02-27-2008, 09:41 AM
 
Tony Pearce Tony Pearce is offline
 

eXpert
  
Join Date: Apr 2004
Location: Totnes, Devon, UK
Posts: 217
 

Default Time based shipping message

Hi All,

I'm trying to get a small message to open on the cart based on the time, basically to warn customers that they are too late for courier deliveries that day, below is the code (very rough and needs loads of work, anyone??)

<?php
if ( strftime("%H") < 14 ) {
echo "Courier orders are still being accepted (hurry for delivery tomorrow";
}
elseif ( strftime("%H") < 15 ) {
echo "We are sorry but Courier orders cannot be placed today for delivery tommorow";
}
else {
echo "Couriers orders will not be dispatched until tomorrow ";
}
?>

I have tried an include and having the above code as a tpl file, straight on the page, but no luck, first time I've tried anything like this so be kind...

Tony
__________________
X Cart version 4.1.9, 4.1.10, 4.1.11, 4.1.12
(Looking after 15 stores)
Just started 4.4.1 for client....
One Page Checkout, On-Sale, Dynamic Images ++++ Loads of others.
+ 2 Multi Domain stores on 4.1.9
Reply With Quote