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

#   Rate and Comment based on usergroup?

##

- **[veeco](/forum/user/18501-veeco "View veeco's Profile")**
- [![veeco's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/18501-veeco "View veeco's Profile") Topic Author
- [ Offline](/forum/user/18501-veeco)

Less More

- Posts: 175
- Thank you received: 0
-
-

12 years 7 months ago -  12 years 7 months ago [\#149363](#149363) by [veeco](/forum/user/18501-veeco "View veeco's Profile")  *[Rate and Comment based on usergroup?](/forum/42-vote/866870-rate-and-comment-based-on-usergroup#149363 "Hello, is there anyway to make different access to rating and comment?  for example: user that is &quot;Administrator&quot; can rate and comment/review user that is &quot;Registered&quot; user can only rate but cannot comment/review &#91;their vote still count&#93;")* was created by *[veeco](/forum/user/18501-veeco "View veeco's Profile")*

Hello, is there anyway to make different access to rating and comment?

for example:
user that is "Administrator" can rate and comment/review
user that is "Registered" user can only rate but cannot comment/review [their vote still count]

Last edit: 12 years 7 months ago by [veeco](/forum/user/18501-veeco "View veeco's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3ZvdGUvODY2ODcwLXJhdGUtYW5kLWNvbW1lbnQtYmFzZWQtb24tdXNlcmdyb3VwP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

12 years 7 months ago [\#149372](#149372) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Rate and Comment based on usergroup?](/forum/42-vote/866870-rate-and-comment-based-on-usergroup#149372 "Hello, is there anyway to make different access to rating and comment?  for example: user that is &quot;Administrator&quot; can rate and comment/review user that is &quot;Registered&quot; user can only rate but cannot comment/review &#91;their vote still count&#93;")*

Hello,
Don't think that there is an option to do that, so the solution will probably be to :
- Go to "Hikashop-&gt;Display-&gt;Views"
- Edit the "form" file of the "vote" view of your front-end template
- Change that line : Code:

&lt;p class="hikashop_form_comment ui-corner-top"&gt;&lt;?php echo JText::_('HIKASHOP_LET_A_COMMENT'); ?&gt;&lt;/p&gt;

By : Code:

&lt;?php $my = JFactory::getUser(); jimport('joomla.access.access'); $config =&amp; hikashop_config(); $userGroups = JAccess::getGroupsByUser($my-&gt;id, (bool)$config-&gt;get('inherit_parent_group_access'));//$my-&gt;authorisedLevels(); if(!empty($userGroups)){ foreach($userGroups as $userGroup){ if($userGroup == YourGroupID){ ?&gt; &lt;p class="hikashop_form_comment ui-corner-top"&gt;&lt;?php echo JText::_('HIKASHOP_LET_A_COMMENT'); ?&gt;&lt;/p&gt;

Note that you'll have to replace the YourGroupID by your Joomla user group ID that you'll be able to find through your Joomla User manager page
- And edit that lines : Code:

&lt;?php } ?&gt;

By : Code:

&lt;?php } } } } ?&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3ZvdGUvODY2ODcwLXJhdGUtYW5kLWNvbW1lbnQtYmFzZWQtb24tdXNlcmdyb3VwP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[veeco](/forum/user/18501-veeco "View veeco's Profile")**
- [![veeco's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/18501-veeco "View veeco's Profile") Topic Author
- [ Offline](/forum/user/18501-veeco)

Less More

- Posts: 175
- Thank you received: 0
-
-

12 years 7 months ago [\#149484](#149484) by [veeco](/forum/user/18501-veeco "View veeco's Profile")  Replied by *[veeco](/forum/user/18501-veeco "View veeco's Profile")* on topic *[Rate and Comment based on usergroup?](/forum/42-vote/866870-rate-and-comment-based-on-usergroup#149484 "Hello, is there anyway to make different access to rating and comment?  for example: user that is &quot;Administrator&quot; can rate and comment/review user that is &quot;Registered&quot; user can only rate but cannot comment/review &#91;their vote still count&#93;")*

Thank You.

The code will make validate whether it's administrator or normal user right?
and hide/show the comment textbox right?
but how if comments and vote connected? The empty comment validation will prevent normal user to vote

any suggestion?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3ZvdGUvODY2ODcwLXJhdGUtYW5kLWNvbW1lbnQtYmFzZWQtb24tdXNlcmdyb3VwP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

12 years 7 months ago [\#149514](#149514) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Rate and Comment based on usergroup?](/forum/42-vote/866870-rate-and-comment-based-on-usergroup#149514 "Hello, is there anyway to make different access to rating and comment?  for example: user that is &quot;Administrator&quot; can rate and comment/review user that is &quot;Registered&quot; user can only rate but cannot comment/review &#91;their vote still count&#93;")*

That code will only hide the **comment text area** and **submit button** for users which are not from the user group that you have set through the YourGroupID variable.
Isn't it what you wanted ?

The following user(s) said Thank You: [veeco](/forum/user/18501-veeco "View veeco's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3ZvdGUvODY2ODcwLXJhdGUtYW5kLWNvbW1lbnQtYmFzZWQtb24tdXNlcmdyb3VwP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[tuanan@lethuongco.com.vn](/forum/user/47826-tuanan-lethuongco-com-vn "View tuanan@lethuongco.com.vn's Profile")**
- [![tuanan@lethuongco.com.vn's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/47826-tuanan-lethuongco-com-vn "View tuanan@lethuongco.com.vn's Profile")
- [ Offline](/forum/user/47826-tuanan-lethuongco-com-vn)

Less More

- Posts: 21
- Thank you received: 1
-
-

7 years 2 months ago [\#310609](#310609) by [tuanan@lethuongco.com.vn](/forum/user/47826-tuanan-lethuongco-com-vn "View tuanan@lethuongco.com.vn's Profile")  Replied by *[tuanan@lethuongco.com.vn](/forum/user/47826-tuanan-lethuongco-com-vn "View tuanan@lethuongco.com.vn's Profile")* on topic *[Rate and Comment based on usergroup?](/forum/42-vote/866870-rate-and-comment-based-on-usergroup#310609 "Hello, is there anyway to make different access to rating and comment?  for example: user that is &quot;Administrator&quot; can rate and comment/review user that is &quot;Registered&quot; user can only rate but cannot comment/review &#91;their vote still count&#93;")*

Hi,
I try to follow your instruction but I don't where is the code
&lt;?php
}
?&gt;
=&gt; I find two and reply by your sugguested code but the page still load error

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3ZvdGUvODY2ODcwLXJhdGUtYW5kLWNvbW1lbnQtYmFzZWQtb24tdXNlcmdyb3VwP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86359
- Thank you received: 14293
-
-

7 years 2 months ago [\#310613](#310613) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Rate and Comment based on usergroup?](/forum/42-vote/866870-rate-and-comment-based-on-usergroup#310613 "Hello, is there anyway to make different access to rating and comment?  for example: user that is &quot;Administrator&quot; can rate and comment/review user that is &quot;Registered&quot; user can only rate but cannot comment/review &#91;their vote still count&#93;")*

Hi,

The instructions are still the same with the latest version of HikaShop.
The lines Code:

&lt;?php } ?&gt;

are just before the end of the file:
[ monosnap.com/file/ZSRAPNGQhCxTXJakQQG4R0sJNRJajb](https://monosnap.com/file/ZSRAPNGQhCxTXJakQQG4R0sJNRJajb)
If you don't replace both pieces of code as explained, it's normal that you get an error.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3ZvdGUvODY2ODcwLXJhdGUtYW5kLWNvbW1lbnQtYmFzZWQtb24tdXNlcmdyb3VwP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) 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.077 seconds

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