Title: Issue loading using ajax
Last modified: April 30, 2020

---

# Issue loading using ajax

 *  Resolved [sixplusonemedia](https://wordpress.org/support/users/sixplusonemedia/)
 * (@sixplusonemedia)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/issue-loading-using-ajax/)
 * 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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fissue-loading-using-ajax%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [Alex Polonski](https://wordpress.org/support/users/alex3493/)
 * (@alex3493)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/issue-loading-using-ajax/#post-12770133)
 * 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](https://wordpress.org/support/users/sixplusonemedia/)
 * (@sixplusonemedia)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/issue-loading-using-ajax/#post-12778218)
 * 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](https://wordpress.org/support/users/sixplusonemedia/)
 * (@sixplusonemedia)
 * [6 years ago](https://wordpress.org/support/topic/issue-loading-using-ajax/#post-12812375)
 * Hi,
 * Any news on this?
 *  Plugin Author [Alex Polonski](https://wordpress.org/support/users/alex3493/)
 * (@alex3493)
 * [6 years ago](https://wordpress.org/support/topic/issue-loading-using-ajax/#post-12818682)
 * Sorry for the late response. I remember entering earlier and for me it worked:
   [https://haverickmeatstoyou.com.au/shop/](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](https://wordpress.org/support/users/sixplusonemedia/)
 * (@sixplusonemedia)
 * [6 years ago](https://wordpress.org/support/topic/issue-loading-using-ajax/#post-12831719)
 * 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](https://wordpress.org/support/users/alex3493/)
 * (@alex3493)
 * [6 years ago](https://wordpress.org/support/topic/issue-loading-using-ajax/#post-12834293)
 * 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](https://wordpress.org/support/users/sixplusonemedia/)
 * (@sixplusonemedia)
 * [6 years ago](https://wordpress.org/support/topic/issue-loading-using-ajax/#post-12837017)
 * Okay yeah sure, just use 2001
 *  Plugin Author [Alex Polonski](https://wordpress.org/support/users/alex3493/)
 * (@alex3493)
 * [6 years ago](https://wordpress.org/support/topic/issue-loading-using-ajax/#post-12845013)
 * 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](https://wordpress.org/support/users/sixplusonemedia/)
 * (@sixplusonemedia)
 * [6 years ago](https://wordpress.org/support/topic/issue-loading-using-ajax/#post-12849679)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/smart-countdown-fx.svg)
 * [Smart Countdown FX](https://wordpress.org/plugins/smart-countdown-fx/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/smart-countdown-fx/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/smart-countdown-fx/)
 * [Active Topics](https://wordpress.org/support/plugin/smart-countdown-fx/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/smart-countdown-fx/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/smart-countdown-fx/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [sixplusonemedia](https://wordpress.org/support/users/sixplusonemedia/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/issue-loading-using-ajax/#post-12849679)
 * Status: resolved