View Single Post
  #6  
Old 02-29-2008, 07:08 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default Re: Time based shipping message

Quote:
Originally Posted by Tony Pearce
Hi,

If I wanted to mix 2 variables, for example:

if (strftime("%A") =="Friday") AND ( strftime("%H") < 14 ) {
echo "Courier orders placed today will not be dispatched until Monday for delivery on Tuesday";
}

Any idea how would I do that?

Thanks for all your help so far.

Tony

Insert in the end file "auth.php":

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

if (
strftime("%A") =="Friday") AND ( strftime("%H") < 14 ) {
  
$a"Courier orders placed today will not be dispatched until Monday for delivery on Tuesday";
}



$smarty->assign("cart_mess"$a); 

The rest is done in the past as an example.
Reply With Quote