This is not something we use (and we most likely will not begin to do so either) as it doesn't really suit our products.
I can see advantages in both approaches. Wouldn't the one suggested by @bonbec be possible through hooks and a database change in your suggestion, @burt?
//Daniel
Template Scheduling
-
14Steve14
- Senior Contributor
- Posts: 921
- Joined: Fri Oct 25, 2019 7:01 pm
- Phoenix Version: v1.0.9.1
- Has thanked: 17 times
- Been thanked: 103 times
Re: Template Scheduling
Not too sure this is something I would use, but here's my tuppence worth.
I would think of this as a website having a fixed default template which would be the standard store look which is displayed most of the time. Then there would be options to select beginning and end dates of specialist templates for things like the time of year, special occasion or what ever.
It would be something simple with a calendar to select start and end dates and when the time has finished the store automatically reverts to the standard template. Whether it would then show the changed template on the same dates the following year would be the thing to decide. Possibly delete the entry once the time has expired, or leave it for the shop owner to delete if they wish.
Keep it simple, and if someone wants to create something better they can but they would have the foundation to do so first. If a user wanted to change something to suit them, they can.
I would think of this as a website having a fixed default template which would be the standard store look which is displayed most of the time. Then there would be options to select beginning and end dates of specialist templates for things like the time of year, special occasion or what ever.
It would be something simple with a calendar to select start and end dates and when the time has finished the store automatically reverts to the standard template. Whether it would then show the changed template on the same dates the following year would be the thing to decide. Possibly delete the entry once the time has expired, or leave it for the shop owner to delete if they wish.
Keep it simple, and if someone wants to create something better they can but they would have the foundation to do so first. If a user wanted to change something to suit them, they can.
- burt
- Core Team
- Posts: 4550
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 412 times
Re: Template Scheduling
Something like this will never be in Core Code.
At best it would be an Addon, and only then if there is enough interest (which there isn't so far
)
@14Steve14 you more or less nailed the mechanics. Just temporarily swap in a template if it's inside the date range. That's all there is to it.
At best it would be an Addon, and only then if there is enough interest (which there isn't so far
@14Steve14 you more or less nailed the mechanics. Just temporarily swap in a template if it's inside the date range. That's all there is to it.
- burt
- Core Team
- Posts: 4550
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 412 times
Re: Template Scheduling
What might go into Core, if I can drum up some help, is the idea of a better view of available templates, along the lines of here: viewtopic.php?f=43&t=3303
Why that might go into Core;
a. we need more templates (there's so far only a couple from me)
b. we need better visibility of those templates
c. it's a lot more "day 1 shopowner" friendly
Anyway...template selection has nothing to do with template scheduling.
Why that might go into Core;
a. we need more templates (there's so far only a couple from me)
b. we need better visibility of those templates
c. it's a lot more "day 1 shopowner" friendly
Anyway...template selection has nothing to do with template scheduling.
- burt
- Core Team
- Posts: 4550
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 412 times
Re: Template Scheduling
Circling back on this, is there anyone else (other than Fred @bonbec) who can see a use for setting up template scheduling in advance ?
-
Dan Cole
- Senior Contributor
- Posts: 498
- Joined: Fri Oct 25, 2019 2:14 pm
- Phoenix Version: 1.0.8.21
- Has thanked: 67 times
- Been thanked: 61 times
Re: Template Scheduling
I can see a use for it but I can't see getting the time back that would likely be involved in developing it. The needed time could likely be spent better elsewhere. Just my nickels worth....we don't produce pennies any more.
Dan
- burt
- Core Team
- Posts: 4550
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 412 times
Re: Template Scheduling
TY for those thoughts Dan. You're right about time taken - there's a very long `to do` list 
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
-
frankl
- Builder
- Posts: 159
- Joined: Tue Feb 23, 2021 8:39 pm
- Phoenix Version: v1.1.0.4
- Has thanked: 17 times
- Been thanked: 25 times
Re: Template Scheduling
Not that I would use something like this, but there are some helpful php functions for dates:
Gives the date for Easter Sunday in the current year
I use this to get a particular holiday that falls on a particular day of a month
Code: Select all
date('Y-m-d',easter_date())Code: Select all
date('Y-m-d', strtotime('first monday of October'))Code: Select all
date('Y-m-d', strtotime('second monday of June'))