| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Time based shipping message | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() 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 |
|||||||
#2
|
|||||||||
|
|||||||||
![]() 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:
|
|||||||||
#3
|
|||||||
|
|||||||
![]() Works great, thanks so much.
Really great instructions!! 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 |
|||||||
#4
|
|||||||||
|
|||||||||
![]() Quote:
You can display this message on any page, just add this code in the "tpl" - file: PHP Code:
|
|||||||||
#5
|
|||||||
|
|||||||
![]() 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
__________________
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 |
|||||||
#6
|
|||||||||
|
|||||||||
![]() Quote:
Insert in the end file "auth.php": PHP Code:
The rest is done in the past as an example. |
|||||||||
#7
|
|||||||
|
|||||||
![]() Great, finished code works a charm.
Much thanks 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 |
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|