Home Forums WoodMart support forum WooCommerce javascript required for non-WooCommerce elements

WooCommerce javascript required for non-WooCommerce elements

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #655165

    josh-6874
    Participant

    While optimizing the site via Perfmatters concerning javascript defer and delay options, I noticed that promo popup and cookie bar don’t function properly unless js.cookie.min.js is excluded from JS delay. I performed another experiment where WooCommerce is disabled on the front page and the two elements (via Perfmatters’ script manager), again, failed to trigger properly. Promo popup and cookie bar seem completely unrelated to WooCommerce. Does this mean promo popup and cookie bars are not unavailable unless WooCommerce plugin is installed? Is this the result of bad coding?

    • This topic was modified 3 weeks, 1 day ago by josh-6874.
    #655199

    Artem Temos
    Keymaster

    Hello,

    Please send us your website admin access so we can check it? Also, send us a link to the page where we can test this functionality and see how it works.

    Kind Regards

    #655967

    josh-6874
    Participant

    This is happening on the front page at https://www.jmic.co.kr
    Thanks in advance for looking into this.

    #655982

    Artem Temos
    Keymaster

    As we can see, the popup works correctly on this page at the moment https://gyazo.com/d9b2d6c7a6ade489c8b5d8a47498193b
    Could you please clarify how to reproduce the problem?

    #655990

    josh-6874
    Participant

    Go to Settings -> Perfmatters, and click JavaScript tab. Under JavaScript Delay exclusions, js.cookie(js.cookie.min.js) must be added to the list – otherwise, the promo popup won’t trigger.

    Attachments:
    You must be logged in to view attached files.
    #656047

    Artem Temos
    Keymaster

    Yes, because you added the promo pop-up to the list as well. And cookie script is its dependency. So you need to either remove both from the list or keep them there.

    #656048

    josh-6874
    Participant

    My question is why is WooCommerce JS file used for non-WooCommerce element such as promo popup?

    #656064

    Artem Temos
    Keymaster

    If the WooCommerce plugin is disabled, our theme loads our own version of this library from /woodmart/js/libs/cookie.min.js.

    #656202

    josh-6874
    Participant

    Thanks for the clarification.

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

The topic ‘WooCommerce javascript required for non-WooCommerce elements’ is closed to new replies.