Home Forums Basel support forum Lazy Load, load button and Ajax Issue

Lazy Load, load button and Ajax Issue

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #18219

    NiBow
    Participant

    We are having issues with the shortcode “Products (grid or carousel)” and BJ lazy load plugin.

    Description of issue:
    On page load the plugin filters the content and adds the lazy load functionality to the html as it should. But when pressing the “load more” button, the plugin does not add the functionality (via admin-ajax.php)

    How we added the functionality to the theme:
    We modified function basel_get_product_thumbnail() and basel_hover_image() in childtheme and added the needed code for the lazy load plugin to work (https://da.wordpress.org/plugins/bj-lazy-load/ see this: http://take.ms/COrNk)
    … code and:
    $hover_image = apply_filters( ‘bj_lazy_load_html’, $hover_image );
    <?php echo ( $hover_image ); ?>
    http://take.ms/6GGHg and http://take.ms/72hmB

    We got this working perfectly for the normal woocommerce loop with the infinite scroll (ajax get via woo_ajax=1)
    when using the “Products (grid or carousel)” VC block, that get content via admin-ajax.php it does not work.

    Can you please help us to fix this issue?
    Both “Products (grid or carousel)” and the woo commerce shop grid uses basel_get_product_thumbnail() and basel_hover_image()

    Attachments:
    You must be logged in to view attached files.
    #18242

    Artem Temos
    Keymaster

    Hello,

    It seems that plugin doesn’t apply its filters for AJAX actions. That is why you will need to customize our theme template files and replace our functions for images with your own instead of using WordPress hooks.

    Kind Regards

Viewing 2 posts - 1 through 2 (of 2 total)