Support » Plugin: We’re Open! » View does not update

  • Resolved oliversaar

    (@oliversaar)


    Hi, I have a problem showing the current informations from the API.

    API is connected fine and in the admin area via “Show retrieved data” it shows me the correct informations.

    I added [open_text]%now%[/open_text] at the end and it shows the current time.

    I tried [open p update=”immediate”] but it destroys the layout and the result is the same.

    I use the DIVI builder.

    This is the returned code:

    {
        "html_attributions": [],
        "result": {
            "business_status": "OPERATIONAL",
            "name": "Gastroenterologie \u00b7 Urologie - Dr. Volker Brand \u00b7 Dr. Kora Brand - Facharztzentrum M\u00fcnchen Martinsried",
            "obfuscated_type": [],
            "opening_hours": {
                "open_now": true,
                "periods": [
                    {
                        "close": {
                            "day": 1,
                            "time": "1700"
                        },
                        "open": {
                            "day": 1,
                            "time": "0800"
                        }
                    },
                    {
                        "close": {
                            "day": 2,
                            "time": "1800"
                        },
                        "open": {
                            "day": 2,
                            "time": "0800"
                        }
                    },
                    {
                        "close": {
                            "day": 3,
                            "time": "1700"
                        },
                        "open": {
                            "day": 3,
                            "time": "0800"
                        }
                    },
                    {
                        "close": {
                            "day": 4,
                            "time": "1500"
                        },
                        "open": {
                            "day": 4,
                            "time": "0800"
                        }
                    },
                    {
                        "close": {
                            "day": 5,
                            "time": "1300"
                        },
                        "open": {
                            "day": 5,
                            "time": "0800"
                        }
                    }
                ],
                "weekday_text": [
                    "Monday: 8:00 AM \u2013 5:00 PM",
                    "Tuesday: 8:00 AM \u2013 6:00 PM",
                    "Wednesday: 8:00 AM \u2013 5:00 PM",
                    "Thursday: 8:00 AM \u2013 3:00 PM",
                    "Friday: 8:00 AM \u2013 1:00 PM",
                    "Saturday: Closed",
                    "Sunday: Closed"
                ]
            },
            "url": "https://maps.google.com/?cid=12685796617698384571"
        },
        "status": "OK"
    }

    Any ideas?

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

Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Author designextreme

    (@designextreme)

    @oliversaar Thanks for the details, you’ve been very comprehensive. I will check this out shortly and report back.

    Plugin Author designextreme

    (@designextreme)

    @oliversaar I did check earlier and then again just now – it seems to be displaying correctly. Did you make a recent change to your page?

    If you found a solution, did you identify the problem?

    Plugin Author designextreme

    (@designextreme)

    @oliversaar I just force refreshed and I can see that the outer tags for each of the child tags are removed… so, this looks like an over-zealous script issue that I can replicate and resolve.

    I will use: [open p update="immediate"] to test and fix this with the new code in the next version.

    Just to let you know, that using “immediate” is not needed unless you’re experiencing issues with the entire page caching and the “now” replacement code not showing the correct time.

    Plugin Author designextreme

    (@designextreme)

    @oliversaar I’ve found the cause of the problem – it was a missing value for $inner_tag. I will release a new version shortly with the fix.

    Thanks so much for finding this! 🙂

    Thread Starter oliversaar

    (@oliversaar)

    @designextreme Thanks for your quick response! Are you seeing times from 8 to 17 each day? Even when I look in incognito mode or in another browser it says every day closed!

    https://www.odrive.com/s/205d27db-2e9b-4116-b864-a2c8de26c182-601b0279

    Plugin Author designextreme

    (@designextreme)

    @oliversaar I just see it all as closed. Isn’t this what you have stored for your Opening Hours?

    The data you have listed in your post is the Retrieved Data from Google My Business and separate from the plugin. You can use this in the main management area to Populate from Google My Business.

    Does it match what you see in Dashboard | We’re Open! ?

    • This reply was modified 5 months, 3 weeks ago by designextreme. Reason: Second paragraph
    Plugin Author designextreme

    (@designextreme)

    @oliversaar Please download version 1.22.

    Thread Starter oliversaar

    (@oliversaar)

    Yes, the immediate update looks good now, good job!

    But I still don’t understand the population from Google My Business, maybe because I cannot find your so called main management. I just saw in your plugin screenshots that there should be some page with the calendar times.

    Where can I find this page, please?
    https://ps.w.org/opening-hours/assets/screenshot-2.png?rev=2269804

    I only can find these pages with tabs below my main wordpress settings:
    https://ps.w.org/opening-hours/assets/screenshot-3.png?rev=2269804

    Plugin Author designextreme

    (@designextreme)

    @oliversaar You can set the opening hours in: Dashboard | We’re Open! (as shown in the first screen).

    If this does not load correctly, it is likely that the previous [all closed] hours are cached in the front-end and you’ll need to clear the website’s data cache. I haven’t heard of anything this heavy before, so I didn’t think to pose this as a solution in my previous response.

    Thread Starter oliversaar

    (@oliversaar)

    Oh my god, I’m sorry for this and this is totally my fault. I don’t know why but I just didn’t recognize the main entry in the navigation section. Always looked in the settings.

    It works and now I can go ahead with adjusting your amazing plugins. Really great work!

    Thanks very much!

    Plugin Author designextreme

    (@designextreme)

    @oliversaar I’m so happy to hear that!

    If you like the plugin, please leave a review 🙂

    Thread Starter oliversaar

    (@oliversaar)

    Absolutely, I will. But first I have to finally integrate it. And there is another bug, but it’s for the other plugin and I open a seperate thread for that.

    • This reply was modified 5 months, 3 weeks ago by oliversaar.
    Plugin Author designextreme

    (@designextreme)

    @oliversaar I spotted the other post in the Google reviews plugin’s forum.

    Thread Starter oliversaar

    (@oliversaar)

    Hi again, I still have an issue with updating the view in a cached page. Should this code with update=”immediate” work?

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

    When I’m calling the test page url, there is a short flickering at the red or green watch at the end of the left side. It seems that open_now and closed_now are refreshing, but not open_text.

    Plugin Author designextreme

    (@designextreme)

    @oliversaar I’ll use your code to replicate this on my Development server when I have a minute.

Viewing 15 replies - 1 through 15 (of 21 total)
  • You must be logged in to reply to this topic.