[Skip to main content](#vessel-content)

#   Only price but no add to cart button for guest, and add to cart for registerd

##

- **[renem](/forum/user/47055-renem "View renem's Profile")**
- [![renem's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar47055.jpg)](/forum/user/47055-renem "View renem's Profile") Topic Author
- [ Offline](/forum/user/47055-renem)

Less More

- Posts: 198
- Thank you received: 7
-
-
- [](http://www.muldermedia.nl)
-

9 years 8 months ago [\#261440](#261440) by [renem](/forum/user/47055-renem "View renem's Profile")  *[Only price but no add to cart button for guest, and add to cart for registerd](/forum/25-install-update/888676-only-price-but-no-add-to-cart-button-for-guest-and-add-to-cart-for-registerd#261440 "-- HikaShop version -- : 3.0.0  Hi,  Is it possible to hide the add to cart buttons for guests? Only registerde users see the add to cart button.  Kind regards René")* was created by *[renem](/forum/user/47055-renem "View renem's Profile")*

-- HikaShop version -- : 3.0.0

Hi,

Is it possible to **hide** the add to cart buttons for guests? Only registerde users **see** the add to cart button.

Kind regards René

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg4ODY3Ni1vbmx5LXByaWNlLWJ1dC1uby1hZGQtdG8tY2FydC1idXR0b24tZm9yLWd1ZXN0LWFuZC1hZGQtdG8tY2FydC1mb3ItcmVnaXN0ZXJkP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34318_2015-11-18-2.png)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 654
-
-

9 years 8 months ago -  9 years 8 months ago [\#261445](#261445) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Only price but no add to cart button for guest, and add to cart for registerd](/forum/25-install-update/888676-only-price-but-no-add-to-cart-button-for-guest-and-add-to-cart-for-registerd#261445 "-- HikaShop version -- : 3.0.0  Hi,  Is it possible to hide the add to cart buttons for guests? Only registerde users see the add to cart button.  Kind regards René")*

Hello,

There is no direct options, to do that **BUT** there is another way to process, in **2** steps :
1°) First use price **ACL** in order to have price access only for **registered** users (or other required user groups)

**Note :** You will find this in products backend and **PRICES AND TAXES** part

2°) Switch off "**Display 'add to cart' button for free products**" option in your Product part (in **Components** =&gt; **HikaShop** =&gt; **Configuration**, and in **Main** tab)

[ ![freeProductOFF.png](/forum/attachment/36112) ](/forum/attachment/36112 "...ProductOFF.png")

This second steps, will make disapear the "free products" button, and so only **registered** or logged people will see the **add to cart** button.
Hope this will fit your needs.

Regards

- [ ![freeProductOFF.png](/forum/attachment/36112) ](/forum/attachment/36112 "...ProductOFF.png") [ ](/forum/attachment/36112?download=1 "...ProductOFF.png")

Last edit: 9 years 8 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg4ODY3Ni1vbmx5LXByaWNlLWJ1dC1uby1hZGQtdG8tY2FydC1idXR0b24tZm9yLWd1ZXN0LWFuZC1hZGQtdG8tY2FydC1mb3ItcmVnaXN0ZXJkP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[renem](/forum/user/47055-renem "View renem's Profile")**
- [![renem's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar47055.jpg)](/forum/user/47055-renem "View renem's Profile") Topic Author
- [ Offline](/forum/user/47055-renem)

Less More

- Posts: 198
- Thank you received: 7
-
-
- [](http://www.muldermedia.nl)
-

9 years 8 months ago [\#261533](#261533) by [renem](/forum/user/47055-renem "View renem's Profile")  Replied by *[renem](/forum/user/47055-renem "View renem's Profile")* on topic *[Only price but no add to cart button for guest, and add to cart for registerd](/forum/25-install-update/888676-only-price-but-no-add-to-cart-button-for-guest-and-add-to-cart-for-registerd#261533 "-- HikaShop version -- : 3.0.0  Hi,  Is it possible to hide the add to cart buttons for guests? Only registerde users see the add to cart button.  Kind regards René")*

Hi Philip,

Good suggestion but guest must see the price for guests (product can't bee free)

What i need:

Guest see a product with price X but no Add to cart button.

Registered user see special price (can be handled with ACL) but also the Add to cart button.

Can this be done hardcoded with PHP? So i can make an override for this view.

Kind regards René

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg4ODY3Ni1vbmx5LXByaWNlLWJ1dC1uby1hZGQtdG8tY2FydC1idXR0b24tZm9yLWd1ZXN0LWFuZC1hZGQtdG8tY2FydC1mb3ItcmVnaXN0ZXJkP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14281
-
-

9 years 8 months ago [\#261537](#261537) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Only price but no add to cart button for guest, and add to cart for registerd](/forum/25-install-update/888676-only-price-but-no-add-to-cart-button-for-guest-and-add-to-cart-for-registerd#261537 "-- HikaShop version -- : 3.0.0  Hi,  Is it possible to hide the add to cart buttons for guests? Only registerde users see the add to cart button.  Kind regards René")*

Hi,

In that case, I would recommend some code modification yes.
Set a price in your product for everyone, without using ACL, and, for example, for the product page, add such code at the top of the file "quantity" of the view "product": Code:

&lt;?php $user = JFactory::getUser(); if($user-&gt;guest) return; ?&gt;

That will remove the display of the add to cart button and the quantity input on the product page.
Note however that if the user know the URL to manually add a product to the cart ( the one in the "HTML add to cart link" button of the product edition page), he would still be able to add a product to the cart by calling that specific URL.
But then, you can add a security and add Access levels restrictions to your payment methods so that guest users don't have any payment methods available on the checkout, and thus preventing them from finishing an order even if they were to manually call the add to cart URL.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg4ODY3Ni1vbmx5LXByaWNlLWJ1dC1uby1hZGQtdG8tY2FydC1idXR0b24tZm9yLWd1ZXN0LWFuZC1hZGQtdG8tY2FydC1mb3ItcmVnaXN0ZXJkP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[renem](/forum/user/47055-renem "View renem's Profile")**
- [![renem's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar47055.jpg)](/forum/user/47055-renem "View renem's Profile") Topic Author
- [ Offline](/forum/user/47055-renem)

Less More

- Posts: 198
- Thank you received: 7
-
-
- [](http://www.muldermedia.nl)
-

9 years 8 months ago [\#261633](#261633) by [renem](/forum/user/47055-renem "View renem's Profile")  Replied by *[renem](/forum/user/47055-renem "View renem's Profile")* on topic *[Only price but no add to cart button for guest, and add to cart for registerd](/forum/25-install-update/888676-only-price-but-no-add-to-cart-button-for-guest-and-add-to-cart-for-registerd#261633 "-- HikaShop version -- : 3.0.0  Hi,  Is it possible to hide the add to cart buttons for guests? Only registerde users see the add to cart button.  Kind regards René")*

Perfect solution Nicolas thanks just what i needed!

The support of HikaShop is awesome!

Kind regards René

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg4ODY3Ni1vbmx5LXByaWNlLWJ1dC1uby1hZGQtdG8tY2FydC1idXR0b24tZm9yLWd1ZXN0LWFuZC1hZGQtdG8tY2FydC1mb3ItcmVnaXN0ZXJkP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.064 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
