Home Forums WoodMart support forum Products per page above 20 – Filtering too slow

Products per page above 20 – Filtering too slow

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #137334

    Stanley Black
    Participant

    Hello,

    When “Number of products per page” and “Products per page variations” are set to low number(10,12,15) everyting works fine. Filtering is working fast.

    But when number of products per page is set above 20 or you select 24 for product per page variations filtering starts to work very slow.
    Page refresh two times before filtering is done.

    Can you from your experience to advise me how to solve this problem?

    Do I need better server permormances? or to modificate your theme and wooccommerce plugin?

    Kind regards

    #137413

    Artem Temos
    Keymaster

    Hello,

    Try to do the following steps:

    1. Be sure that you have deactivated all the external plugins while checking and don’t have child theme.

    2. Update the theme and all the included plugins to the latest versions.

    3. Disable swatches attribute to be displayed on the shop page in Theme Settings -> Shop -> Attribute swatches.

    4. Go to Appearance -> Customize -> WooCommerce -> Product images, decrease images size for both single and catalog page and save to regenerate all thumbnails.

    5. Keep plugins deactivated and send us the admin access so we can check it as well.

    Kind Regards

    #139045

    Stanley Black
    Participant

    Hello,

    When theme is updated filtering starts to work faster.
    It working without a problem when 40,50 products are set in “Number of products per page”.

    But I need more and I achieve that with disabling “AJAX functionality for filters widgets on shop” in Theme settings.

    Now I need one more thing and my problem is resolved.

    When filter is chose I want to page scroll to the filter section. Not to goes to the top of a page.

    This is possible when “AJAX functionality for filters widgets on shop” is enabled
    + your custom code

    add_filter(
    ‘woodmart_ajax_scroll_offset’,
    function(){
    return 140;
    },
    10
    );
    How to achieve the same now when page is refreshing?

    Kind regards

    #139107

    Eric Watson
    Participant

    Hello,

    We can increase the waiting time for a response from AJAX so that the page does not reload.

    add_filter( 'woodmart_pjax_timeout', function(){
    	return 20000;
    } );

    Kind Regards
    XTemos Studio

    #139139

    Stanley Black
    Participant

    Hello,

    Thanks for your response.

    This solutions also work but solution without Ajax is much more faster.
    In future I will use CDN and Cloudflare and then refreshing page will be very fast.

    Is it possible to page scroll down to filter section on filter change?

    Kind regards

    #139147

    Artem Temos
    Keymaster

    Sorry, but it works only when you use AJAX function for the shop page.

    #139706

    Stanley Black
    Participant

    Hello,

    Can you tell me which file is the parent of this file
    themes\woodmart\woocommerce\content-product-base.php?

    which file is one step above?

    I need that for custom coding.

    Now my site has 1000 variable product and loading for product categories is above 15 sec.

    Kind regards

    #139735

    Artem Temos
    Keymaster

    Hi,

    It is included in the file content-product.php.

    Kind Regards

    #139761

    Stanley Black
    Participant

    Thank you!!!

    Please can you provide me 3 more steps above?

    1.?
    2.?
    3.?
    4.content-product.php
    5.content-product-base.php

    Kind regards

    #139762

    Artem Temos
    Keymaster

    We know that the general file is archive-product.php and all other steps above are related to WooCommerce and we don’t know exactly.

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