• Resolved mtm100

    (@mtm100)


    Hello, thanks for this great plugin. I am wondering if it is possible to display the shortcode in a popup when we are closed.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author janizde

    (@janizde)

    Hi mtm100,
    what exactly do you mean by popup? Sth like a real popup window when you click somewhere? It’s probably not supported by the plugin itself but maybe I can figure out a way you could do this.

    Thread Starter mtm100

    (@mtm100)

    Hi janizde,
    Yeah I was thinking a popup window. We are a quick serve restaurant with online ordering. When we are closed I was thinking to have popup telling the customer we are closed and that they could place there order for the next time that we are open. I use popup maker and I didn’t know if it would be possible to trigger a popup during closed hours.

    Thanks for any help you can provide.

    Thread Starter mtm100

    (@mtm100)

    Here is some info I found from popupmaker about using other shortcodes. Below is from popupmaker documentation.

    // Or even use other shortcodes.
    [popup_trigger id=”123″][button_shortcode][/popup_trigger]

    Not sure how to implement but I would like to open a popup when we are closed and show our next opening time in it . Do you think opening hours shortcode could trigger the popup?

    Thanks again for all your help!

    • This reply was modified 6 years, 3 months ago by mtm100.
    Thread Starter mtm100

    (@mtm100)

    Here is some info I found from popupmaker about using other shortcodes. Below is from popupmaker documentation.

    // Or even use other shortcodes.
    [popup_trigger id=”123″][button_shortcode][/popup_trigger]

    Not sure how to implement but I would like to open a popup when we are closed and show our next opening time in it . Do you think opening hours shortcode could trigger the popup?

    Thanks again for all your help!

    Sorry about duplicate post, I hit submit twice.

    • This reply was modified 6 years, 3 months ago by mtm100.
    Plugin Author janizde

    (@janizde)

    I think it shoud be easy to just use one of the shortcodes as for the popup modal. The tricky part is to use the Opening Hours data as a trigger for the popup. I could not find a programatic way of triggering a popup with Popup Maker. If you find one (e.g. if they provide a WordPress filter for this) there are two things to take into consideration:

    1. Is the shop currently open? You can access this information using the programatic API of Opening Hours, more specifically the method Set::isOpen as documented here: https://github.com/janizde/WP-Opening-Hours/blob/master/doc/developer-guide.md#-sets

    2. You will probably have to check whether the user has already been presented the popup in the current “session” (you will have to determine what a session actually is in your context) e.g. using cookies

    This the most detailed information I can give you at the moment

    Hope it helps

    • This reply was modified 6 years, 2 months ago by janizde.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Show in Popup’ is closed to new replies.