• Resolved Damian Góra

    (@damian-gora)


    Hi Niloy (@im_niloy),

    I develop a few plugins including FiboSearch and FiboFilters. In the FiboFilters plugin, we have a conflict with your JVM WooCommerce Wishlist. The integration requires adding some things to your plugin. Let me explain what’s going on.

    The main product’s HTML container is dynamically overwritten in FiboFilters when the page reloads or when the filter state changes. You can learn more how it works here. In these cases, we lose JS events that are registered by JVM WooCommerce Wishlist.

    It’s a popular issue and we solve it in integrations with other plugins or themes by calling special functions to reinitialize or reset all events. Unfortunatelly I didn’t find such a function in the JS file jvm-woocommerce-wishlist/assets/js/wishlist.js.

    Could you add a way to reinit all necessary JS events using the global scope variable? It could look like this:

    window.cix_wishlist_reinitialize();

    Then we and maybe other developers will be able to call this function every time when the JS events need to be registered again, especially after loading products by AJAX.

    Best
    Damian Góra

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Niloy

    (@im_niloy)

    Hey Damian,
    Thank you so much for your suggestion. I’ll definitely take a look at it later and make sure to include it in the next release.

    Thread Starter Damian Góra

    (@damian-gora)

    Good to know! I’m waiting for the next plugin release.

    Plugin Author Niloy

    (@im_niloy)

    Hi @damian-gora ,

    Just wanted to let you know that I’ve released an update [2.0.3] where I added a global function to initialize the plugin code.

    cix_wishlist_init()
    Thread Starter Damian Góra

    (@damian-gora)

    Hi Niloy,

    Thank you for the latest release where we can find the cix_wishlist_init() function. I confirm it works. There is only one issue. This function doesn’t remove old events. After calling it eg. 3 times, you will have registered 3 the same events.

    The solution was to call the following code before calling cix_wishlist_init().

    jQuery(".jvm_add_to_wishlist, .wishlist-undo").off('click');

    Thank you very much for your commitment and help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.