This topic has 6 replies, 3 voices, and was last updated 9 years, 5 months ago ago by Stan Russell
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
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.
Hello Eva – No the price is NOT showing on the live site because
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
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.
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.
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.
You must be logged in to reply to this topic.Log in/Sign up