Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Virtuemart Template - PureMart (SKU# FLEX-00010)

TOPIC: How to hide add to cart unless logged in

How to hide add to cart unless logged in 11 years 2 months ago #2626

Hi guy's,

I'd like to have my store so that only logged in/registered members can see the add to cart buttons, is this possible?

It would work so a non-member/guest can view products but cannot buy unless they are logged in. Once they log in, the buy now buttons will show.

I want to use a paid membership plugin (e.g membership-pro) so only paying members can log in to buy products.

Thanks in advance for your help.

Gina,
J2.5.7
VM2.0.18a
The topic has been locked.

How to hide add to cart unless logged in 11 years 2 months ago #2663

Hi,

There is no parameter in Virtuemart backend that will let you hide the "add to cart" for non-members.
Because practically it doesn't make any sense. But in your situation looks different and it does make sense.

There is an option in VM Backend to hide prices from un-logged, but not for add to cart button.

But you can do this trick. It eventually hides the "add to cart" button not-logged (non-members)

1- Browse: VM Backend > Configuration > Pricing
Unchecked this option: Show call for price, when the price is empty

2- Open any product:
And change the "price appearing" to "-default-"


Attachment Pasted_Image_2_27_13_6_46_AM.gif not found




in this dropdown:
-default- group means: Registered users (members)
-anonymous- group means: non-member

In reality, you are hiding the price for that product from "non-members" and "call for price" button will be replaced with "add to cart" button. But since you have disabled the "Show call for price, when the price is empty", so nothing will be visible for "non-member"
But this will also hide the prices though. I don't know if this will work for you, since you just need to disable the "add to cart" button.

This is what you are capable of doing with default settings. To go beyond, you would need some hard coding in PHP files, which is not covered by our free support, because it is a custom modification.

Regards.
Forum Support.
Last Edit: 11 years 2 months ago by Support.
The topic has been locked.

How to hide add to cart unless logged in 11 years 2 months ago #2920

Thanks for your great help guys.
The topic has been locked.

How to hide add to cart unless logged in 11 years 2 months ago #2932

Thanks - marked solved..
The topic has been locked.
Time to create page: 0.085 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo