Skip to main content

How to hide add to cart button to unregistered use

14 years 9 months ago #36990 by IanK
Hi - Is there anyway in Hikashop Essentials to hide the product 'Add to Cart' button from un-registered users.

Please Log in or Create an account to join the conversation.

14 years 9 months ago #37109 by nicolas
Hi,

Not in the essential edition but in the Business edition, you can use access levels restrictions on prices to achieve that. When there is no price the add to cart button won't be displayed (instead, you will have a "free" text displayed that you can override to have the text you want).

Please Log in or Create an account to join the conversation.

14 years 9 months ago #37187 by IanK
Thank you Nicolas

Please Log in or Create an account to join the conversation.

11 years 5 months ago #202883 by ler@singmuiheng.com
Hi, found your solution when searching for this answer, however, can not find a way to set restriction to price, any navigation guide?

Please Log in or Create an account to join the conversation.

11 years 5 months ago #202884 by ler@singmuiheng.com
i found the access control for price, but is there a way to change all at once? i have more than thousand products.......zzz

or a sql query ?

Please Log in or Create an account to join the conversation.

11 years 5 months ago #202886 by nicolas
Hi,

When you edit your product in the backend, in the Prices area where you entered the price, there is an "access level" column with an icon you can click on in order to set that user group restriction on the price.

Please Log in or Create an account to join the conversation.

11 years 4 months ago #203998 by ler@singmuiheng.com
but it will be a massive job to edit 2000+ product price and access level just to hide one add to cart button for guest

is there any easier way ? maybe smnthg like

<?php if notlogin
style display="none" add to cart button?

Please Log in or Create an account to join the conversation.

11 years 4 months ago #204013 by nicolas
Hi,

You can use a mass action via the menu System>Mass actions to do that change for all the products at once.

You can also add custom code in the file "quantity" of the view "product" via the menu Display>Views in order to hide the add to cart button for guests.
Something like that at the top:
<?php if(!hikashop_loadUser()) return; ?>

Please Log in or Create an account to join the conversation.

Time to create page: 0.063 seconds
Powered by Kunena Forum