PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Funnelkit and Fox compatability issue?

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Hi,

We have noticed an issue when using Funnelkit and Fox together.

When an item is added to the funnelkit cart the mini cart in the woodmart theme menu cart updates correctly.

When the item is then removed from funnelkit cart the woondmart theme menu cart does not change.

This behaviour only happens when FOX currency plugin is active.

Please can you advise on where the issue may be with this cart clearing behaviour?

Regards

Hello

The problem is a timing issue - when FunnelKit removes an item, the AJAX call `get_refreshed_fragments` is triggered, but the WoodMart header cart icon doesn't update because the fragments refresh happens too quickly.

Please try adding one of these code snippets to your theme's functions.php (or use a custom code snippet plugin):

Option 1 - Simple delay and refresh:

add_action('wp_footer', function() {
    ?>
    <script>
    jQuery(document).on('removed_from_cart', function() {
        setTimeout(function() {
            jQuery(document.body).trigger('wc_fragment_refresh');
        }, 300);
    });
    </script>
    <?php
});

Option 2 - Force fragments reload:

add_action('wp_footer', function() {
    ?>
    <script>
    jQuery(document).on('removed_from_cart', function() {
        setTimeout(function() {
            jQuery.ajax({
                url: wc_cart_fragments_params.wc_ajax_url.toString().replace('%%endpoint%%', 'get_refreshed_fragments'),
                type: 'POST',
                success: function(data) {
                    if (data && data.fragments) {
                        jQuery.each(data.fragments, function(key, value) {
                            jQuery(key).replaceWith(value);
                        });
                    }
                }
            });
        }, 300);
    });
    </script>
    <?php
});

 

Try Option 1 first - it's simpler. If that doesn't work, try Option 2.

Let me know if this resolves the issue.

p.s. renew the support please, purchase code is expired