"Quickview" – Hide Prices for Visitors not logged in Catalog Visibility Options

This topic has 6 replies, 3 voices, and was last updated 9 years, 5 months ago ago by Stan Russell

  • Avatar: trina99
    trina99
    Participant
    June 4, 2015 at 15:36

    Hello
    I have the Catalog Visibility Options plugin set to hide prices and add to cart from users who are not logged in. This works fine, EXCEPT on the products category page “Quickview” popup where they can see the prices and add to cart button without being logged in.
    http://docs.woothemes.com/document/catalog-visibility-options/

    Thanks

    Please, contact administrator
    for this information.
    5 Answers
    Avatar: Eva
    Eva Kemp
    Support staff
    June 4, 2015 at 16:21

    Hello,

    I’ve checked Quick View and price isn’t shown there:
    http://storage4.static.itmages.com/i/15/0604/h_1433431185_9845012_f08932c91c.png

    Please clear browser cache and check again.

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: trina99
    trina99
    Participant
    June 9, 2015 at 15:16

    Hello Eva – No the price is NOT showing on the live site because

      I had to disable the price and “add to cart” on the live site

    The price and add to cart are only supposed to be for logged in users, so Until the issue is fixed I have had to disable them in the theme settings.

    I DO want to show the price and “add to cart” for logged in users only on the quickview, and that is what I am asking about.

    Please see the image below in private content and you will see what it looks like to a visitor that is Not logged in.
    ie. The price and “add-to-cart” are hidden on the category page but ARE showing on the quickview.
    I am using the Woocommerce Catalog Visibility Options plugin

    Please, contact administrator
    for this information.
    Avatar: Eva
    Eva Kemp
    Support staff
    June 9, 2015 at 15:29

    Hello,

    Try to edit the file product-quick-view.php in the directory wp-content/themes/woopress/woocommerce, find the lines 51 and 59 and replace the code <?php if (etheme_get_option('quick_price')): ?> with <?php if (etheme_get_option('quick_price') && is_user_logged_in()): ?>

    and

    replace this code <?php if (etheme_get_option('quick_add_to_cart')): ?> with this one <?php if (etheme_get_option('quick_add_to_cart') && is_user_logged_in()): ?>.

    Please try it.

    Regards,
    Eva Kemp.

    Avatar: trina99
    trina99
    Participant
    June 9, 2015 at 20:15

    Hello Eva
    Thank you for the code updates
    Yes – that seems to be working fine now, and only logged in users can see the price and add-to-cart.
    What happens if we update theme – will we have to edit this file every time?
    Thank you.

    Avatar: stan
    Stan Russell
    Participant
    June 10, 2015 at 08:06

    Hello,

    please create child theme and move to it your edited theme files before update. In this case you will not lose customization on theme update.
    You can read more about child themes here: https://codex.wordpress.org/Child_Themes

    Regards,
    Stan Russell.

  • Viewing 6 results - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.Log in/Sign up

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.