• Resolved Rok Balboa

    (@rok-balboa)


    We have setup famous Woocommerce Block Shop theme https://woocommerce.com/products/block-shop/ and try to integrate Wish List plugin.
    We found out that Thumb button – the small heart is not showing on product loop when products are loaded via ajax. This is how products are loaded: https://blockshop.wp-theme.design/the-shop/

    The heart Icon is loaded only on first/initially displayed products but not on those which are loaded by infinity loading when scrolling.

    I did check in the html code and the elements with classes ‘alg-wc-wl-btn…’ are present, but the icon element <i class=”fa fa-heart” aria-hidden=”true”></i> doesn’t have :before pseudo selector.
    Tried to add it with Jquery after ajax is finished, but could not show it whatever I do.

    • This topic was modified 5 years, 5 months ago by Rok Balboa.
    • This topic was modified 5 years, 5 months ago by Rok Balboa.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Pablo Pacheco

    (@karzin)

    Hello,
    Please check if this gist can help you:
    https://gist.github.com/pablo-sg-pacheco/070d45491e92a81be5bdb4d49c84f9e2

    You only need to replace ‘yith_infs_added_elem‘ by the event name triggered by this theme or plugin that is creating the infinite loading

    Thread Starter Rok Balboa

    (@rok-balboa)

    Thanks, solved it ??
    Just replaced ‘yith_infs_added_elem’ with ‘ajaxStop’.

    // Load hearts infinite scroll
    jQuery(document).on(‘ajaxStop’, function () {
    jQuery(‘.alg-wc-wl-btn’).addClass(‘ajax-loading’);
    var alg_wc_wl_show = function () {
    jQuery(‘.alg-wc-wl-btn.ajax-loading’).removeClass(‘ajax-loading’);
    }
    var alg_wc_wl_position = function () {
    if (typeof alg_wc_wl_thumb_btn_positioner === ‘undefined’ || jQuery.isEmptyObject(alg_wc_wl_thumb_btn_positioner)) {
    jQuery(‘body’).on(‘alg_wc_wl_thumb_btn_positioner’, function (e) {
    alg_wc_wl_thumb_btn_positioner = e.obj;
    alg_wc_wl_thumb_btn_positioner.init();
    });
    } else {
    alg_wc_wl_thumb_btn_positioner.init();
    }
    setTimeout(alg_wc_wl_show, 200);
    };
    setTimeout(alg_wc_wl_position, 500);
    });

    Plugin Author Pablo Pacheco

    (@karzin)

    Great!
    If you notice anything else let me know, and please consider leaving a review. It’s really important ??

    See you

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Thumb button – small heart not showing on product loop’ is closed to new replies.