• Hello YITH Support Team,

    I’m currently using the YITH Infinite Scrolling plugin on my WooCommerce site, and I’ve encountered an issue when applying AJAX-based product filters. After filtering, the expected behavior is to only display the products that match the filter criteria. However, I’ve noticed that after applying a filter, the infinite scrolling functionality seems to add additional products that do not match the filter criteria to the end of the product list. This results in a mix of filtered and non-filtered products being displayed together.

    Here are some details about my setup:

    • I’m using AJAX calls to filter products based on custom criteria (such as price range, categories, etc.).
    • After the AJAX call successfully returns the filtered products and updates the DOM, the infinite scrolling plugin continues to load more products as if the filter was not applied.

    I suspect the issue might be related to the plugin not being aware of the DOM changes made by the AJAX filter. I’m looking for a way to either reset or refresh the infinite scrolling functionality after an AJAX filter has been applied to ensure that only the filtered products are displayed as the user scrolls.

    Could you please provide guidance or suggestions on how to resolve this issue? Is there a specific method or approach to integrate YITH Infinite Scrolling with AJAX-based filtering more seamlessly?

    Thank you for your assistance!

    Best regards,

    Isa

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support Facundo Arano

    (@aranofacundo)

    Hi there,

    I checked your site, and in this case, the problem is that while the AJAX filters updates the products in the page, it doesn’t update the WooCommerce pagination links with the filters that should be applied as parameters.

    Since our plugin uses the URL links of the pagination to retrieve the products of the next page, you will need to add the parameter filters to those links so that it works correctly.

    For example, if you check the code of the page, you will see that the link of the next page in the pagination, remains as https://didacmania-test.com/tienda-de-juguetes-didacmania/page/2/ even when the filters are applied.

    I suggest you contact the developers of the AJAX Filters plugin so they add this change and then check if the issue is solved.

    Let us know if you need more help.

Viewing 1 replies (of 1 total)
  • The topic ‘ajax vs YITH infinite scrolling’ is closed to new replies.