Show in Popup
-
Hello, thanks for this great plugin. I am wondering if it is possible to display the shortcode in a popup when we are closed.
-
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.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.
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 8 years, 4 months ago by
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 8 years, 4 months ago by
mtm100.
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 8 years, 4 months ago by
janizde.
-
This reply was modified 8 years, 4 months ago by
The topic ‘Show in Popup’ is closed to new replies.