- Posts: 88
- Thank you received: 0
Limit Calendar Dates
- wonderwilson
-
Topic Author
- Offline
Less
More
15 years 2 weeks ago #25727
by wonderwilson
Limit Calendar Dates was created by wonderwilson
Hi,
In the Business version you can feature a delivery calendar - is it possible to make some days unavailable; Saturdays, Sundays and Mondays for example? And also have the earliest date available three days from order?
Thanks
Darren
In the Business version you can feature a delivery calendar - is it possible to make some days unavailable; Saturdays, Sundays and Mondays for example? And also have the earliest date available three days from order?
Thanks
Darren
Please Log in or Create an account to join the conversation.
15 years 2 weeks ago #25735
by nicolas
Replied by nicolas on topic Re: Limit Calendar Dates
That's not possible. We use the calendar library of joomla for that and it doesn't support that without a lot of coding and modifications. That's however an interesting request so we'll see if we can come up with a solution in the future, but for now, you won't be able to do it.
Please Log in or Create an account to join the conversation.
- wonderwilson
-
Topic Author
- Offline
Less
More
- Posts: 88
- Thank you received: 0
15 years 2 weeks ago #25740
by wonderwilson
Replied by wonderwilson on topic Re: Limit Calendar Dates
Thanks Nicolas,
Our client has some specific delivery details they require, for example:
Order on Monday > Receive on Thursday
Order on Tuesday > Receive on Friday
Order on Wednesday > Receive on Tuesday
Order on Thursday > Receive on Wednesday
Order on Friday > Receive on Thursday
Order on Saturday > Receive on Thursday
Order on Sunday > Receive on Thursday
Is there a way of identifying the day the order is made and show the delivery date within the checkout and the email the customer receives, for example:
The customer orders a pie on Monday, when they check-out they see the text 'Expected Delivery Date: Thursday' which also appears on the email to the customer.
Sorry for the specifics - the client has changed their mind on this many time.
Darren
Our client has some specific delivery details they require, for example:
Order on Monday > Receive on Thursday
Order on Tuesday > Receive on Friday
Order on Wednesday > Receive on Tuesday
Order on Thursday > Receive on Wednesday
Order on Friday > Receive on Thursday
Order on Saturday > Receive on Thursday
Order on Sunday > Receive on Thursday
Is there a way of identifying the day the order is made and show the delivery date within the checkout and the email the customer receives, for example:
The customer orders a pie on Monday, when they check-out they see the text 'Expected Delivery Date: Thursday' which also appears on the email to the customer.
Sorry for the specifics - the client has changed their mind on this many time.
Darren
Please Log in or Create an account to join the conversation.
15 years 2 weeks ago #25741
by nicolas
Replied by nicolas on topic Re: Limit Calendar Dates
That's possible.
For the checkout, you need to edit the file "cart" of the view "checkout" via the menu Display->Views. There you will have to add some PHP code, like that:
switch(date('N')){
case '1':
//Monday
case '5':
//Friday
case '6':
//Saturday
case '7':
//Sunday
echo 'Expected Delivery Date: Thursday';
break;
case '2':
//Tuesday
echo 'Expected Delivery Date: Friday';
break;
case '3':
//Wednesday
echo 'Expected Delivery Date: Tuesday';
break;
case '4':
//Thursday
echo 'Expected Delivery Date: Wednesday';
break;
}
For the email notification, you should edit it via the menu "System->Emails" (Business edition only) and add something similar but change the first line by:
switch(date('N',$data->order_modified)){
For the checkout, you need to edit the file "cart" of the view "checkout" via the menu Display->Views. There you will have to add some PHP code, like that:
switch(date('N')){
case '1':
//Monday
case '5':
//Friday
case '6':
//Saturday
case '7':
//Sunday
echo 'Expected Delivery Date: Thursday';
break;
case '2':
//Tuesday
echo 'Expected Delivery Date: Friday';
break;
case '3':
//Wednesday
echo 'Expected Delivery Date: Tuesday';
break;
case '4':
//Thursday
echo 'Expected Delivery Date: Wednesday';
break;
}
For the email notification, you should edit it via the menu "System->Emails" (Business edition only) and add something similar but change the first line by:
switch(date('N',$data->order_modified)){
Please Log in or Create an account to join the conversation.
- wonderwilson
-
Topic Author
- Offline
Less
More
- Posts: 88
- Thank you received: 0
15 years 2 weeks ago #25745
by wonderwilson
Replied by wonderwilson on topic Re: Limit Calendar Dates
Thanks Nicolas,
You guys are brilliant!
Darren
You guys are brilliant!
Darren
Please Log in or Create an account to join the conversation.
- wonderwilson
-
Topic Author
- Offline
Less
More
- Posts: 88
- Thank you received: 0
15 years 1 week ago #25814
by wonderwilson
Replied by wonderwilson on topic Re: Limit Calendar Dates
Hi Nicolas,
This works like a charm - one thing though, is it possible to add the actual date as well as the day?
Thanks
Darren
This works like a charm - one thing though, is it possible to add the actual date as well as the day?
Thanks
Darren
Please Log in or Create an account to join the conversation.
15 years 1 week ago #25816
by nicolas
Replied by nicolas on topic Re: Limit Calendar Dates
To display the date, you can do like that:
$day = 60*60*24;
switch(date('N')){
case '1':
//Monday
$date = time() + $day*3;
break;
case '5':
//Friday
$date = time() + $day*6;
break;
case '6':
//Saturday
$date = time() + $day*5;
break;
case '7':
//Sunday
$date = time() + $day*4;
break;
case '2':
//Tuesday
$date = time() + $day*3;
break;
case '3':
//Wednesday
$date = time() + $day*6;
break;
case '4':
//Thursday
$date = time() + $day*6;
break;
}
echo date('F j, Y',$date);
for the email notification, you would have to replace also time() by $data->order_modified
The format can be changed following this:
www.php.net/manual/en/function.date.php
$day = 60*60*24;
switch(date('N')){
case '1':
//Monday
$date = time() + $day*3;
break;
case '5':
//Friday
$date = time() + $day*6;
break;
case '6':
//Saturday
$date = time() + $day*5;
break;
case '7':
//Sunday
$date = time() + $day*4;
break;
case '2':
//Tuesday
$date = time() + $day*3;
break;
case '3':
//Wednesday
$date = time() + $day*6;
break;
case '4':
//Thursday
$date = time() + $day*6;
break;
}
echo date('F j, Y',$date);
for the email notification, you would have to replace also time() by $data->order_modified
The format can be changed following this:
www.php.net/manual/en/function.date.php
Please Log in or Create an account to join the conversation.
- wonderwilson
-
Topic Author
- Offline
Less
More
- Posts: 88
- Thank you received: 0
15 years 1 week ago #25817
by wonderwilson
Replied by wonderwilson on topic Re: Limit Calendar Dates
Thanks Nicolas - works perfectly!
Darren
Darren
Please Log in or Create an account to join the conversation.
Time to create page: 0.180 seconds