Support » Plugin: Smart Countdown FX » Issue loading using ajax

  • Resolved sixplusonemedia

    (@sixplusonemedia)


    Hi,

    Great plugin!

    Only issue I have found is that the numbers don’t populate when placing the timer in locations where it gets loaded via ajax into a block, like in the WooCoomerce cart on the site. If you update the cart the timer gets reloaded, but only the seconds will show up. All the other blocks stay blank.

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Alex Polonski

    (@alex3493)

    It depends on how plugin code is rendered in block. Timer plugin needs to run some Ajax requests to get current settings, events, etc. If it fails to do so, it starts from scratch, i.e. for 0 seconds – looks like this is the issue you report.

    I will check your link in my browser dev tools and come back here if I have suggestions.

    Thread Starter sixplusonemedia

    (@sixplusonemedia)

    Hi,

    Thanks for that. So from checking dev tools, the ajax lookup url is this:
    /wp-admin/admin-ajax.php?action=scd_query_next_event&smartcountdown_nonce=ea8fe56c87&unique_ts=1588600400050&id=smartcountdown-3

    and the response is this:

    {err_code: 100, err_msg: "Invalid Token!"}
    err_code: 100
    err_msg: "Invalid Token!"
    Thread Starter sixplusonemedia

    (@sixplusonemedia)

    Hi,

    Any news on this?

    Plugin Author Alex Polonski

    (@alex3493)

    Sorry for the late response. I remember entering earlier and for me it worked: https://haverickmeatstoyou.com.au/shop/

    There are some layout issues, but the counter itself looks good. So I thought the problem was already solved.

    However, I have you page open right now and there is no error in smartcountdown-3 AJAX response.

    Maybe I’m missing something.

    Thread Starter sixplusonemedia

    (@sixplusonemedia)

    Hi Alex,

    The issue is when you add something to the cart. The sidebar that opens up you’ll see the only box that is populated is the seconds and from the code inspector you can see a network error in the ajax response.

    Weird thing is, that sometimes it works.

    Plugin Author Alex Polonski

    (@alex3493)

    OK, now I get it. I cannot test it because a valid zip-code is required to proceed, I think. Can you provide a sample zip-code, so I can get to the shopping cart?

    Thread Starter sixplusonemedia

    (@sixplusonemedia)

    Okay yeah sure, just use 2001

    Plugin Author Alex Polonski

    (@alex3493)

    Now I see the issue. I’m not sure why you display countdown timer in sopping cart – it is the same as you show on shop page.

    Really, sometimes it works. It depends on which script is run first – sidebar shopping cart or Smart Countdown FX ajax. Smart Countdown admin ajax requires wp_nonce token, so if it’s not set in request, code_err: 100 is returned.

    I’m not sure we can fix it. I propose that you keep shop page countdown that works and remove any additional counters from sidebar cart.

    Thread Starter sixplusonemedia

    (@sixplusonemedia)

    Hi,

    Thanks. We’ve removed it from the sidebar. It was there as the client wanted it, but I agree it makes no sense there.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Issue loading using ajax’ is closed to new replies.