How to hide add to cart button to unregistered use

  • Posts: 51
  • Thank you received: 0
12 years 10 months ago #36990

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.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
12 years 10 months ago #37109

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.

  • Posts: 51
  • Thank you received: 0
12 years 10 months ago #37187

Thank you Nicolas

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

  • Posts: 567
  • Thank you received: 11
9 years 6 months ago #202883

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.

  • Posts: 567
  • Thank you received: 11
9 years 6 months ago #202884

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.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
9 years 6 months ago #202886

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.

  • Posts: 567
  • Thank you received: 11
9 years 5 months ago #203998

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.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
9 years 5 months ago #204013

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.076 seconds
Powered by Kunena Forum