Need to develop a modification for Tilda on pure JS
Hello, we need to develop a "code constructor" in pure JS. In fact, the body of the code, as I understand it, should be the same, but inside, in some place, a piece of code is substituted that is responsible for script 1 or 2.
The essence of the code is the modification of actions with reference to time in various situations
Situation 1 – what should be the settings
1) Interact with any block on Tilda (Standard, Zero block, popup) i.e. substitution of the block id in #rec0001 format or a link to popup #mypopup
2)Conditions of display, I can choose the time from how many to how many will be shown block/popup setting time zone immediately can be additional settings:
- Choice of days of the week (each day of the week has its own time
- At another time, I can substitute a link for the block/popup that will be shown (for example, you need to set up a block that will be shown during working hours, and in non-working hours another will be shown, and on weekends the third,
Heres what the settings should look like:
Day of the week (Mon) – Time of the show (from 10:00 to 21:59) – Link to the block / popup that we show (#rec0001) – Link to the block / popup that we show the rest of the time (#mypopup) – If 2 or 1 block is popup, then there should be another time setting, after how much to show it, i.e. a person went to the site for example, after non-working hours and after 5 seconds he is shown popp and informs about how much to show it, i.e. a person went to the site for example, after 5 seconds he is shown popp and informs him that that the online store does not accept orders now.
Or we simply hide the block with goods after hours and put another block that informs that the online store is not accepting orders now.
Here you also need to take into account (if possible) the transition from the 1st day to another, i.e. non-working hours can be from 22:00 (Mon) to 10:00 (Tue) or suggest how to solve it
Situation 2
1.Interact with any block on Tilda (Standard, Zero block, popup) i.e. substitution of the block id in #rec0001 format or a link to popup #mypopup
2.Conditions of display, I can choose after which date to hide the block and show another.
Heres what the settings should look like:
Date ( 22.10.22) – Time (at 10:59) – action hide block (#rec0001) – show block instead of (#rec0002)
For example, on the site you need to make a promotion that is limited to a certain date for all visitors
What else is important:
1) When updating the page, there should be no "reset" of the settings, i.e. something should be written to the cache and fixed, so that it would not be visible how one block disappeared, the second appeared
2) There can be 2 such codes on the page, i.e. you need to isolate them from each other, so that they do not conflict
If you have any questions, write, on the budget offer yourself
14.10.2022 14:58