Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter joelmellin

    (@joelmellin)

    The support for the variation swatches wrote:

    “Hi Joel,

    Thanks for getting back to us.

    We need an event from your filter plugin should be triggered after new products are loaded.

    Please ask for a trigger from your filter plugin author that fires after new products are loaded.

    So, that I can help you to reinitiate our Swatches script after filtering products.

    Hope to hear from you soon.

    Thank You”

    Plugin Author Nick McReynolds

    (@woobewoo)

    Hello @joelmellin,

    I think we have the right hook for you.

    wpfAjaxSuccess

    This is how to use it:

    document.addEventListener(‘wpfAjaxSuccess’, function(event) {console.log(‘Custom js’);});

    Thread Starter joelmellin

    (@joelmellin)

    Thanks, but where exactly do I place this code

    document.addEventListener(‘wpfAjaxSuccess’, function(event) {console.log(‘Custom js’);});

    that you wrote above? I am not a programmer myself so I have no clue.

    Plugin Author Nick McReynolds

    (@woobewoo)

    Hi @joelmellin,

    You asked us for a trigger for the developers of the “variation swatches” plugin, this is the trigger for them.

    Are you planning to modify their plugin? If not, pass this trigger/hook to them.

    Thread Starter joelmellin

    (@joelmellin)

    Ok, thanks. I have passed it on to them.

    Thread Starter joelmellin

    (@joelmellin)

    I got a reply from the developers of the “variation swatches” plugin:

    Hi Joel,

    It works when you hit this link- https://mellins.nu/?wpf_count=48&wpf_filter_cat_1=800

    Then uncheck the “B?nor, Linser, ?rtor” and recheck it again.

    But it is not working after the initial load https://mellins.nu/.

    To understand it clearly, I have displayed “Hakik” using the given event.

    If you check it carefully, you can see it is displayed before “XHR finished loading”.

    Here is a screenshot for your convenience- https://paste.pics/RCRHY

    Please contact the filter plugin author and ask them for an event that fires after all content loads.

    Then we can try our trigger for that event.

    Thank You

    Plugin Author Nick McReynolds

    (@woobewoo)

    For developers:

    On a page without parameters, the script with the trigger that you are trying to call does not load
    https://i.imgur.com/oD4S7PP.png

    And on the page with filter parameters it loads https://i.imgur.com/PK7dVA3.png

    Our event is called correctly, but the file with the specified trigger woo_variation_swatches_pro_init is not loaded into the browser https://i.imgur.com/J9yFB1g.png

    You need to check the variation swatches settings – perhaps there are restrictions on when to load pro-js and when not.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Filtering causes problem with variation swatches’ is closed to new replies.