Home Forums WoodMart support forum Products not displaying when "All" Products Per Page selected

Products not displaying when "All" Products Per Page selected

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

    mv
    Participant

    Hello there,

    We’re having some issues when a user selects “All” Products per page when viewing our store catalog. Occasionally (but not every time) no products will load. It seems that when a user first selects “All”, it works fine. But if the user then reloads their browser, no products display. Also all the filtering menus disappear as well. See attached screenshots of the site working properly, and then not working.

    We understand that sometimes it takes a while to load if we have a lot of products. But this happens even on subcategories with four products total.

    Can you please advise?

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

    Hello,

    Please deactivate all the plugins not related to the theme and switch the parent theme, check the issue, if the problem remains, leave the plugins not activated and provide the site admin access to the private area

    Best Regards

    #130078

    mv
    Participant

    Hello there,

    Is there a list of plugins that are related to Woodmart? Multiple people have worked on this website and I’m not sure which plugins are related to the theme and which are not.

    Thank you.

    #130105

    Hello,

    Here is the list of theme-related plugins:

    CMB2
    Redux Framework
    Slider Revolution
    WPBakery Page Builder
    Woodmart Core
    Contact Form 7
    MailChimp for WordPress
    WooCommerce
    Safe SVG

    Best Regards

    #130235

    mv
    Participant

    Hello,

    I’ve deactivated all the plugins and activated the parent theme and the issue still remains (note that we are unable to deactivate Jetpack or Akismet because of the host).

    #130300

    Hello,

    Please provide your FTP access to the private area.

    Best Regards

    #130409

    mv
    Participant

    See private reply

    #130450

    Artem Temos
    Keymaster

    Try to add the following PHP code snippet to the child theme functions.php file

    add_action( 'woocommerce_before_shop_loop', 'woodmart_products_per_page_select', 25 );
    
    	function woodmart_products_per_page_select() {
    		if ( ! woodmart_get_opt( 'per_page_links' ) || ( wc_get_loop_prop( 'is_shortcode' ) || ! wc_get_loop_prop( 'is_paginated' ) || ! woocommerce_products_will_display() ) ) return;
    		
    		global $wp_query;
    
    		$per_page_options = woodmart_get_opt('per_page_options');
    
    		$products_per_page_options = (!empty($per_page_options)) ? explode(',', $per_page_options) : array(12,24,36,-1);
    
    		?>
    
    		<div class="woodmart-products-per-page">
    
    			<span class="per-page-title"><?php esc_html_e('Show', 'woodmart'); ?></span>
    
    				<?php
    					foreach( $products_per_page_options as $key => $value ) :
    						?>
    							<a rel="nofollow" href="<?php echo add_query_arg('per_page', $value, woodmart_shop_page_link(true)); ?>" class="per-page-variation<?php echo woodmart_get_products_per_page() == $value ? ' current-variation' : ''; ?>">
    								<span><?php
    									$text = '%s';
    									esc_html( printf( $text, $value == -1 || $value == 5000 ? esc_html__( 'All', 'woodmart' ) : $value ) );
    								?></span>
    							</a>
    							<span class="per-page-border"></span>
    				<?php endforeach; ?>	
    		</div>
    		<?php
    	}

    And the option Products per page variations set to http://prntscr.com/o7rloc

    #130568

    mv
    Participant

    Hello,

    That appears to have solved the issue. Thank you for your help and your prompt service!

    #130599

    Artem Temos
    Keymaster

    You are welcome!

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