‘No products found which match your selection’ messages

Hello,
I just purchased ‘groups restrict categories’ plugin to hide product categories from non-logged in users. It blocks non-logged in users but it shows ‘No products found which match your selection’ message which is found in no-product-found.php.

I don’t want people to think that I don’t have any items in that categories. so would you please tell me how to change that message to ‘you must log in to view products’ ?

ps: I don’t want to change that message in ‘no-product-found.php’

6 Responses to ‘No products found which match your selection’ messages

  1. jiyoung March 12, 2014 at 12:50 pm #

    Hello,

    I want to leave ‘No products found which match your selection’ message as it is for the search result and create ‘Please log in to view products.’ messages for the non-login users.

    I pasted in pastebin.com

    http://pastebin.com/LVTEkeNd

    Thank you,

    Please, help me to fix this problem.

    • antonio March 13, 2014 at 7:33 am #

      Hi,
      I hope this code helps you.
      cheers

      • jiyoung March 16, 2014 at 3:54 am #

        Thank you very much for your reply,
        The code you sent me worked and saved my day!

  2. jiyoung March 11, 2014 at 9:56 pm #

    Hello,
    I don’t quite understand how to incorporate

    if ( !is_user_logged_in() ) {
    _e( 'Please log in to view products.' );
    }

    into my theme>woocommerce/loop/no-products-found.php

    This is a copy of my theme (zonda)>woocommerce/loop/no-products-found.php

    Toggle

    • antonio March 12, 2014 at 7:11 am #

      Hi,
      please use pastebin.com to shown us your file.
      cheers

  3. kento March 11, 2014 at 8:05 pm #

    The solution for this is to customize the template but instead of hacking the template within woo commerce, you override the template by copying it to yourtheme/woocommerce/loop/no-products-found.php

    There you would use for example:

    if ( !is_user_logged_in() ) {
    _e( 'Please log in to view products.' );
    }

    Reference:

    https://github.com/woothemes/woocommerce/blob/master/templates/loop/no-products-found.php

    In other words, you should not customize the default template but create a customized copy in your theme.

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account

Share