• Carolina

    (@carolinaop)


    Hello Support,

    I have a shop page with a grid of products and Ajax filters, after that’s a text and image section and after this section there is a carousel with the best seller products.

    Since best sellers are only a few products, if the user filters the product grid sometimes the best-seller carousel gets empty. In a page with 2 different product listings it would be very useful to choose if we want to apply the filter or not.

    Is there any way to disable filtering a specific product loop/ product grid or page section?

    Thanks!

    • This topic was modified 1 year ago by Carolina.

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Giuseppe Madaudo

    (@askmagic)

    Hi there,

    but it’s not possible whit this plugin.

    Thread Starter Carolina

    (@carolinaop)

    Hello Giuseppe,

    Perhaps I was not clear :/ I have a page with a product’s grid and the filters, that is working fine. But at the end of the page there’s a products carousel that shows only the tag “best sellers”. When user uses the filters, it changes also this product’s carousel at the end of the page.

    I solved this problem with the code snippet shared in this topic -> https://www.ads-software.com/support/topic/yith-woocommerce-ajax-product-filter-reloads-the-whole-page/

    So now all archive page filters only change the main grid and that is the desired outcome.

    However, in the homepage, I have one carousel that doesn’t have any filter and a second one that should be able to get filtered. If I use the ID of the code snippets, it filters only the correct one but doesn’t show the correct result.

    You can visit this page here

    Could you please tell me why the filtered content is not right?

    The ID placed in the snippet should just target the grid/carousel to filter, this shouldn’t change the result of the filter, right?

    Thanks

    • This reply was modified 1 year ago by James Huff. Reason: link moved to proper field
    Thread Starter Carolina

    (@carolinaop)

    Hello Support,

    I’ve asked sales team if the pro version of the plugin could solve this issue. They told me that I should ask here in the forum.

    Could you please answer if with the Pro version of the plugin I can choose to enable or disable ajax filtering in a product loop/ product grid?

    Thanks

    Plugin Support crodriguez1991

    (@crodriguez1991)

    Hello there,

    Maybe if you want to apply a different selector based on the page you are. You can adapt the code with an if else and check with a conditional tag if you are for example in the front page.

    if( ! function_exists( 'yith_wcan_content_selector' ) ){
        function yith_wcan_content_selector( $selector ){
    
            if( is_front_page() ) {
               $selector = 'custom_selector_for_front_page';
            } else {
               $selector = '#section-4-270';
            }
    
            return $selector;
        }
        add_filter( 'yith_wcan_content_selector', 'yith_wcan_content_selector' );
    } 

    In this way you can filter different area based on the page you are.

    Please, try it and let me know if it can helps you.

    Have a good day.

    Thread Starter Carolina

    (@carolinaop)

    Hi,

    This code snippet in fact prevents the other carousel to also filter the products but the result of the filter isn’t correct. It only shows 1 item in some of the filters that have more then 1.

    So it changes the filter logic.

    Plugin Support crodriguez1991

    (@crodriguez1991)

    Hello there,

    I hope you’re doing well :D.

    If the tag is a taxonomy, the plugin will try to load the taxonomy page. In that case the plugin try to load the taxonomy page and maybe for this reason you see a different layout. Anyway I don’t know if you added the code because I cannot see if the code is applied.

    Please, could you send me the code you added?

    I’m looking forward your response.

    Have a good day.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Disable Ajax Filtering for a certain product grid’ is closed to new replies.