![]() |
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 |
Re: Time based shipping message
Insert in the end file "auth.php":
PHP Code:
Open file "skin1/modules/Fast_Lane_Checkout/home.tpl", find lines: PHP Code:
insert after: PHP Code:
|
Re: Time based shipping message
Works great, thanks so much.
Really great instructions!! Tony |
Re: Time based shipping message
Quote:
You can display this message on any page, just add this code in the "tpl" - file: PHP Code:
|
Re: Time based shipping message
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 |
Re: Time based shipping message
Quote:
Insert in the end file "auth.php": PHP Code:
The rest is done in the past as an example. |
Re: Time based shipping message
Great, finished code works a charm.
Much thanks Tony |
All times are GMT -8. The time now is 09:45 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.