Products are not showing in the categories menu in shop

Solved10 replies4 participantsUpdated by Tony Rodriguez

  • Avatar: budfwaldo
    budfwaldo
    Participant

    The products are not showing when clicking on the menu. The menu is constructed using categories. I suspect it is a permalinks problem but don’t know how to fix it.

    Please, contact administrator
    for this information.

    10 Answers

    Avatar: Ayan Rahman
    Ayan Rahman
    Support staff

    Hi,

    Thank you for reaching out to us.

    1/ You can also try to re-save the permalink structure under Settings > Permalinks.

    2/ It is possible that the cause of this is related to cached data.
    We kindly recommend clearing the cache after making changes to products and categories. This includes clearing WooCommerce-related caches, which can be found in the following section:
    WooCommerce > Status > Tools
    Please ensure you clear the following fields:
    – WooCommerce transients
    – Expired transients
    – Term counts
    – Brands transients
    If you continue to experience any issues after performing these steps, please do not hesitate to contact us for further assistance.

    Warm Regards,
    The 8Theme Team

    Avatar: budfwaldo
    budfwaldo
    Participant

    Thank you for your quick reply.
    Unfortunatelly, after taking all the steps above, the products are still not showing. (see screenshot). Could you take a look?

    Files is visible for topic creator and
    support staff only.
    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff

    Hello, budfwaldo,

    Could you please let us know if you are using any additional caches or a CDN? It seems that the issue might be related to this, as the products are displayed correctly when we open the page in the editor (whether it is the Customizer or Elementor). We have also cleared the cache available on your website, but it did not resolve the problem.

    If you have any additional caches or a CDN, please clear them and check the site again.

    Best regards,
    8Theme Team

    Avatar: budfwaldo
    budfwaldo
    Participant

    I have now disabled all caches, reset permalinks, cleaned transients as to above. No change. Then disabled all plugins except woocommerce, xstore & elementor. Products appear temporarily. But as I re activate plugins one by one, they suddenly disapear again. Starting over with clearing and disabling all caches, clean transients, disable all plugins, no products. Change theme to twenty-twentyfive, products appear. Re activate XStore, products dissapear, evan after going through all steps above.
    Seems to be Theme related, not plugin nor cache related. After each step I reload sample page of site using Command Shift R in Chrome on a macOS Tahoe, so I doubt it is browser cache related.

    I have also reactivated all plugins in theme twenty-twentyfive, and the products are showing.

    It really seems to be XStore related.
    What Now?

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff

    In this case, we kindly ask you to provide us with access to your website’s FTP and temporarily disable the cache and CDN.

    Best regards,
    8Theme Team

    Avatar: budfwaldo
    budfwaldo
    Participant

    Cache plugin has been disabled but not removed.

    Please contact administrator
    for this information.
    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff

    Hello, budfwaldo,

    Thank you for providing access. To resolve this issue, we have added the following code to your child theme functions.php. We would also like to note that this fix will be included in the next theme update

    /**
     * Fix empty product category archives caused by XStore detached variations mode.
     *
     * XStore option "Show product variations separately" can exclude parent variable
     * products from category archives and return an empty query.
     */
    add_filter( 'et_option_variable_products_detach', '__return_false', 1 );
    add_filter( 'theme_mod_variable_products_detach', '__return_false', 1 );
    
    /**
     * Extra safety: do not hide parent variable products on archives.
     */
    add_filter( 'et_option_variation_product_parent_hidden', '__return_false', 1 );
    add_filter( 'theme_mod_variation_product_parent_hidden', '__return_false', 1 );
    
    /**
     * Clear XStore variation query cache once.
     */
    add_action( 'init', function () {
    	if ( get_option( 'child_xstore_variation_cache_cleared' ) ) {
    		return;
    	}
    
    	delete_transient( 'et_variable_products_have_children_ids' );
    	delete_transient( 'et_variations_ids' );
    	delete_transient( 'et_variable_products_excluded_have_children_ids' );
    
    	update_option( 'child_xstore_variation_cache_cleared', 1, false );
    }, 1 );

    Best regards,
    The 8Theme Team

    Avatar: budfwaldo
    budfwaldo
    Participant

    Perfect! Thank you!

    Avatar: budfwaldo
    budfwaldo
    Participant

    Thanks for the support! My topic “Products are not showing in the categories menu in shop” has been successfully resolved.

    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff

    Dear budfwaldo,

    It’s great having you in our WordPress & WooCommerce community!

    Every insight you share helps us refine XStore and build tools that empower thousands of online store owners worldwide.

    Together, we grow stronger with every release.

    Topic closed.
    The 8Theme Team

The issue related to '‘Products are not showing in the categories menu in shop’' has been successfully resolved, and the topic is now closed for further responses