• oliversaar

    (@oliversaar)


    Is there any way to show page visitors the weekday when business is opening again or the days until it is open again?

    Maybe I did something wrong, but I was just able to tell the visitor hours until business is open again which can be a problem sometimes when business is closed more than two days. E.g. the display says: “This business opens again in 61 hours”. I don’t know if there are many people out there who can tell at what time it will be open again ??

    This is my code:

    [open_text update="immediate"]
        %if_open_now%
        <span class="op-open">Gerade ge?ffnet</span>
        %end%
        %if_closed_now%
        <span class="op-closed">Gerade geschlossen</span>
        %end%
        <span class="op-next-period op-next-period">
        %if_open_now%
          Wir schlie?en um %today_end% Uhr.
        %end%
        %if_closed_now%        
          %if_open_tomorrow% Wir ?ffnen um %tomorrow_start% Uhr. %end%
          %if_closed_tomorrow% Wir ?ffnen in %hours% Stunden wieder. %end%
        %end%
       [/open_text]

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Design Extreme

    (@designextreme)

    @oliversaar I think I mentioned something similar to this in a previous post.

    The replacement text and logic currently runs for “yesterday”, “today” and “tomorrow”, so if it falls outside of these restrictions then it will not look for any changes outside of the parameters.

    I will be extending this to go beyond tomorrow and find the next change in status – however it isn’t simply a case of changing the search parameter – I will need a whole new set of logic to realise this. Extending the replacement codes takes a fair bit of consideration to make something that is intuitive and simply extending the logic flags in the code itself. Basically, it all relates to the other similar post.

    I have noted it on my to-do list and I’ll be in touch when it’s ready for its release.

    • This reply was modified 4 years ago by Design Extreme. Reason: Link to previous post
    Plugin Author Design Extreme

    (@designextreme)

    @oliversaar On a similar note, I would like to extend the logic generally to allow for such statements as “If > X hours then:” – but this is quite a big task to cover all eventualities and make it approachable to most users.

    Plugin Author Design Extreme

    (@designextreme)

    @oliversaar Sorry, I just re-read your question. Yes, I can add “days” in the same format as “hours” in a subsequent version.

    On a related issue, do you think I need to introduce a zero/singular/plural conditional statement?

    e.g. “if less than 1 day”, “if 1 day (but less than 2 days)”, “if 2+ days”

    See, it really doesn’t take a long because this becomes a pretty big feature extension…

    Thread Starter oliversaar

    (@oliversaar)

    I would say, the best and most direct way to really find out when a business is open again would be to know exactly when. So as a user I would have a good feeling and would be quickly informed with something like “Sorry, we’re closed. We open again on Monday, 8.3.2021 at 8:00 o’clock”. But only if the closing time is more than one day.

    Same day = “…we open again today at 3 o’clock p.m.
    Next day = “…we open again tomorrow at 8 o’clock a.m.
    After tomorrow = “… we open again on Monday, 8.3.2021 at 8 o’cock a.m.

    Plugin Author Design Extreme

    (@designextreme)

    @oliversaar I’ll introduce logic that will look beyond “tomorrow” and then some new replacement text for days and day names. There’s more packed into this extension than on the surface.

    Plugin Author Design Extreme

    (@designextreme)

    @oliversaar Until the new version is ready, may I suggest the following in your case:

    [open_text update="immediate"]
        %if_open_now%
        <span class="op-open">Gerade ge?ffnet</span>
        %end%
        %if_closed_now%
        <span class="op-closed">Gerade geschlossen</span>
        %end%
        <span class="op-next-period op-next-period">
        %if_open_now%
          Wir schlie?en um %today_end% Uhr.
        %end%
        %if_closed_now%        
          %if_open_tomorrow% Wir ?ffnen um %tomorrow_start% Uhr. %end%
          %if_closed_tomorrow% Wir sind offen wieder am Montag um 8 Uhr. %end%
        %end%
       [/open_text]

    If you’re closed for over a day, then Monday is always the next day that you’re open. Obviously this is temporary, but it is accurate for your situation.

    Plugin Author Design Extreme

    (@designextreme)

    @oliversaar I’ve been making a few nice additions for the next version:

    • Added %else% to check for the opposite of the current IF statement.
    • Added a day change count until status change (open => closed or closed => open)
    • Added an hours divisor to work with the day change count

    This isn’t exactly the new functionality requested here, but it is a step forward.

    When I figure out an elegant way present the new conditional statements, I will add this to the mix (something like if closed now, later, tomorrow then… with the same for open and two sets of inverse logic) .

    Anyway, the new replacement text will help in realising your opening hour statements.

    Thread Starter oliversaar

    (@oliversaar)

    Sounds cool. I’m really looking forward for the new version ??

    And your suggestion of a temporary fixed time makes sense, thanks!

    Plugin Author Design Extreme

    (@designextreme)

    @oliversaar Added the new functionality and updated the Demo website with the same.

    Thread Starter oliversaar

    (@oliversaar)

    Oh yes! Really a good improvement, thanks!!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Show days or weekname instead of hours’ is closed to new replies.