• Resolved miyasa

    (@miyasa)


    Great plugin which solved a lot of my problems, since I had to find a way to make a large list of product attributes in my WooCommerce store collapsible.

    Alas, I am currently using the plugin with a WooCommerce plugin called “Advanced AJAX Layered Navigation” and I have a slight problem with this combination.

    The Standard Widget Extensions plugin works great when the website (https://okage.de/tabletdb) is initially loaded, but once I choose an attribute to filter my products, the expand/collapse function stops working.

    I have already investigated a little bit and I think the problem is, that the expand/collapse function only works correctly for elements already present in the DOM. So once Ajax is triggered Standard Widget Extensions fails to load properly because the DOM is not refreshed.

    I would be super happy if you can help me solve this problem or maybe point me in the right direction so I can make the necessary changes myself.

    どうぞ宜しくお願いいたします

    https://www.ads-software.com/plugins/standard-widget-extensions/

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author blogger323

    (@blogger323)

    Perfect Japanese! I wonder if you learned Japanese somewhere.

    Anyway, I’d like to make it certain that I came to understand your problem. The problem happens when you choose one of MARKE/BETRIEBSSYSTEM/CPU/… on your site, right?

    I assume I’m right and moving forward. From my investigation, I think modifications will be needed on both sides, SWE and ajax_layered_nav.js on your site.

    – Regarding SWE, make it available to call initialize function from other scripts.
    – Regarding ajax_layered_nav.js, call the SWE initialize function from showPage().

    If you are familiar with programming, it would be achieved. But if you are not, I don’t recommend to modify the source code.

    For me, it’s not so difficult to modify SWE. You can decide going ahead or not.

    miyasa, did you figure this problem out. Im using yith ajax and SWE which causes the same competing issues.

    Plugin Author blogger323

    (@blogger323)

    Ndesign55,

    Do you mean YITH WooCommerce Ajax Navigation? Thanks for your information!

    Yes! Im using YITH WooCommerce Ajax Navigation. SWE works fine until i filter my products and the class (hm-swe-accordion-head) on my H3 disappears as well as functionality of the widget. I wish I was more of a programmer to test this. Should I try Advanced AJAX Layered Navigation because it looks like its a problem with both at the moment.

    Plugin Author blogger323

    (@blogger323)

    Ndesign55,

    In SWE 1.6, you can call swe.reloadHandler() after Ajax updating to keep widgets working. For YITH WooCommerce Ajax Navigation, you can add swe.reloadHandler() after a(document).trigger(“yith-wcan-ajax-filtered”) in yith-wcan-frontend.min.js.

    a(document).trigger("ready");a(document).trigger("yith-wcan-ajax-filtered"); swe.reloadHandler();}})})

    It worked for me. Please try it on your site.

    Plugin Author blogger323

    (@blogger323)

    For WooCommerce Advanced Ajax Layered Navigation, you can place swe.reloadHandler() near the end of showPage() in ajax_layered_nav.js.

    /* Re-fire the pageLoaderInit() function. This adds the live click handlers to the newly
     * readded elemets
     */
    pageLoaderInit();
    swe.reloadHandler();

    WooCommerce Advanced Ajax Layered Navigation is not free and I can’t check the behavior after modification. So please try it by yourself.

    Your script worked like a charm for me in yith-wcan-frontend.min.js.
    Thank you for your help and extended support with each of these modules…cheers

    Plugin Author blogger323

    (@blogger323)

    Thanks for the feedback. I’d like to mark this topic as resolved.

    Plugin Author blogger323

    (@blogger323)

    In version 1.7, the Ajax support get improved. You no longer have to change the plugin files.

    But you still have something to take care of. Check the following entry.

    https://en.hetarena.com/archives/350

    Blogger 323 solution is not working for me. I have the same problem where after I select an item, using the SWE with the YITH, and reset my page, the accordion widget will not stay open when I click on it…I click and after a small delay it closes itself.

    Any thoughts would be appreciated.

    AJ

    Plugin Author blogger323

    (@blogger323)

    Let me clarify your situation.

    1. Select an item.
    2. Partial page update by YITH.
    3. Then SWE doesn’t work properly. With just one click, it would open and close.

    Right?

    Are you using SWE 1.7.3?
    Which theme are you using?

    YITH WooCommerce Ajax Navigation Version 1.4.1

    Standard Widget Extensions Version 1.7.3

    Woothemes Shelflife Theme with a child instance created

    Modified yith-wcan-frontend.min.js

    window.history.pushState({pageTitle:b.pageTitle},””,q);a(document).trigger(“ready”);a(document).trigger(“yith-wcan-ajax-filtered”); swe.reloadHandler();}})});

    No effect but we have wp-rocket caching installed with the minify javascript turned off so I also modified yith-wcan-frontend.js

    //trigger ready event

    $(document).trigger(“ready”);

    $(document).trigger(“yith-wcan-ajax-filtered”);

    swe.reloadHandler();

    Still no effect on this.

    Behavior can be seen live at https://bridepower.com/product-category/gowns/

    Thank you in advance for any help you might be able to give us.

    Regards,

    AJ

    Let me clarify my situation a bit further.

    1. navigate to page
    2. Select an item.
    3. Everything works fine
    4. Use the Yith WooCommerce Ajax Reset Navigation widget to clear all selections
    5. Partial page update by YITH.
    6. Then SWE doesn’t work properly. With just one click, it would open and close.

    Thank you in advance,

    AJ

    When I remove the swe.reloadHandler(); from the yith, everything works correctly except for the loading of the image next to the h3

    When I first navigate to the page here is the Code that appears triggering the image:

    <h3 class=”hm-swe-expanded” style=”cursor: default;”>Designer</h3>

    When I select an item within the accordion or use the reset button, the class never gets assigned:

    <h3 style=”cursor: default;”>Designer</h3>

    But if I click on the accordion itself, the styling re-appears

    <h3 class=”hm-swe-expanded” style=”cursor: default;”>Designer</h3>

    Any thoughts on this?

    AJ

    Plugin Author blogger323

    (@blogger323)

    As I mentioned just before your first post, you no longer need to modify the YITH JavaScript files.

    Regarding an issue of losing the class attribute, a following article will help you.
    https://en.hetarena.com/archives/350

    Regarding an issue of the strange behavior, open and close with one-click, I will release a fixed version, hopefully next weekend.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Problem with Ajax Standard Widget Extensions’ is closed to new replies.