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

#   How to add Vote and Comments for whole directory?

##

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

Less More

- Posts: 178
- Thank you received: 5
-
-
-
-

13 years 6 months ago [\#105698](#105698) by [alikon1](/forum/user/17244-alikon1 "View alikon1's Profile")  *[How to add Vote and Comments for whole directory?](/forum/4-how-to/82661-how-to-add-vote-and-comments-for-whole-directory#105698 "Can I add &quot;Vote and Comments&quot; not for single product, but for all category, where this product is located?")* was created by *[alikon1](/forum/user/17244-alikon1 "View alikon1's Profile")*

Can I add "Vote and Comments" not for single product, but for all category, where this product is located?

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 6 months ago [\#105724](#105724) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[How to add Vote and Comments for whole directory?](/forum/4-how-to/82661-how-to-add-vote-and-comments-for-whole-directory#105724 "Can I add &quot;Vote and Comments&quot; not for single product, but for all category, where this product is located?")*

Hi,

You mean on a products listing ?
If it is, you can have the vote enabled here, the option is in the module/menu configuration.

If you need the vote and comments on the category, it's not yet implemented but on our TODO list.

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

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

Less More

- Posts: 178
- Thank you received: 5
-
-
-
-

13 years 6 months ago [\#105725](#105725) by [alikon1](/forum/user/17244-alikon1 "View alikon1's Profile")  Replied by *[alikon1](/forum/user/17244-alikon1 "View alikon1's Profile")* on topic *[How to add Vote and Comments for whole directory?](/forum/4-how-to/82661-how-to-add-vote-and-comments-for-whole-directory#105725 "Can I add &quot;Vote and Comments&quot; not for single product, but for all category, where this product is located?")*

Vote and comments on the category. OK. Wait this function in future.

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

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

Less More

- Posts: 178
- Thank you received: 5
-
-
-
-

11 years 9 months ago [\#189854](#189854) by [alikon1](/forum/user/17244-alikon1 "View alikon1's Profile")  Replied by *[alikon1](/forum/user/17244-alikon1 "View alikon1's Profile")* on topic *[How to add Vote and Comments for whole directory?](/forum/4-how-to/82661-how-to-add-vote-and-comments-for-whole-directory#189854 "Can I add &quot;Vote and Comments&quot; not for single product, but for all category, where this product is located?")*

> Xavier wrote: Hi,
>
> You mean on a products listing ?
> If it is, you can have the vote enabled here, the option is in the module/menu configuration.
>
> If you need the vote and comments on the category, it's not yet implemented but on our TODO list.

Did you do this function? A year has gone)

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 9 months ago [\#190023](#190023) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[How to add Vote and Comments for whole directory?](/forum/4-how-to/82661-how-to-add-vote-and-comments-for-whole-directory#190023 "Can I add &quot;Vote and Comments&quot; not for single product, but for all category, where this product is located?")*

Hi,

Sorry but we still don't have added the votes for the categories, we don't had many requests about this so it was not set as a priority task. But it is still on our todo list ![:)](/media/kunena/emoticons/3.png ":)")

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

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

Less More

- Posts: 127
- Thank you received: 6
-
-

11 years 1 month ago -  11 years 1 month ago [\#217582](#217582) by [Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")  Replied by *[Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")* on topic *[How to add Vote and Comments for whole directory?](/forum/4-how-to/82661-how-to-add-vote-and-comments-for-whole-directory#217582 "Can I add &quot;Vote and Comments&quot; not for single product, but for all category, where this product is located?")*

Can I add our vote for this feature too (forgive the pun).

We're currently working on how to easily implement votes for several versions of products (bikes) all with essentially the same features and benefits within their category, but with different Product IDs. It would be great to be able to assign Votes on all products within some Categories, for example, Bikes, and for individual products in other categories, for example, Bike Accessories.
I've noticed you have a vote_type field in table _vote, but currently all entries are listed as "product". So I can see you have this feature planned.
As we are working on this too, perhaps we could share the task...

Last edit: 11 years 1 month ago by [Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile").

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 1 month ago [\#217686](#217686) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[How to add Vote and Comments for whole directory?](/forum/4-how-to/82661-how-to-add-vote-and-comments-for-whole-directory#217686 "Can I add &quot;Vote and Comments&quot; not for single product, but for all category, where this product is located?")*

Hi,

In fact, the vote type is currently used for the products and allow the vendor of HikaMarket too, so we don't yet have planned to restrict votes per categories, etc. The vote type are for the HikaShop add-ons, and potentially for the categories.

To restrict votes per categories, you can enable or not the votes in the menus / modules parameters and to restrict it on the product pages, you can edit the view "product / show" in order to avoid the display of the votes for specific categories thanks to some custom code.

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

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

Less More

- Posts: 127
- Thank you received: 6
-
-

11 years 1 month ago [\#217693](#217693) by [Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")  Replied by *[Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")* on topic *[How to add Vote and Comments for whole directory?](/forum/4-how-to/82661-how-to-add-vote-and-comments-for-whole-directory#217693 "Can I add &quot;Vote and Comments&quot; not for single product, but for all category, where this product is located?")*

Thanks Xavier
We want to allocate any vote for any product in say, Sport Bike category, so that it appears for all products in that category, Sport Bike 1, Sport Bike 2, etc. All Sport Bikes are very similar, so any vote would be relevant to all bikes in that category.
Does this make sense?

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 1 month ago [\#217713](#217713) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[How to add Vote and Comments for whole directory?](/forum/4-how-to/82661-how-to-add-vote-and-comments-for-whole-directory#217713 "Can I add &quot;Vote and Comments&quot; not for single product, but for all category, where this product is located?")*

Hi,

Ok I undestand your situation. I think that the easiest way would be to create a new mass action.
A massaction launched "after a product is updated".

For the action, develop a plugin in order to update the vote value for all the products in the same category than the product updated.
So in your case, if the vote value of the product "Sport Bike 1" is changed, update the column "product_average_score" and "product_total_vote" of product "Sport Bike 2" with the values of the "Sport Bike 1" product.

That way all the products of the same category will have the same ratings.

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

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

Less More

- Posts: 127
- Thank you received: 6
-
-

11 years 1 month ago [\#217852](#217852) by [Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")  Replied by *[Bobwales](/forum/user/30257-bobwales "View Bobwales's Profile")* on topic *[How to add Vote and Comments for whole directory?](/forum/4-how-to/82661-how-to-add-vote-and-comments-for-whole-directory#217852 "Can I add &quot;Vote and Comments&quot; not for single product, but for all category, where this product is located?")*

Thanks Xavier
If I understand you correctly you're suggesting creating a plugin that updates the average ratings and number of votes for all items in a category. Then the comments would be shown only on the product they were written for, but all products in that category would show the same average rating.

What we are hoping to achieve is that any vote/comment on one product in a category would be associated with all products in that same category. The product view for any one product in that category would show comments for all products in that category.

I think we are almost thinking the same, but not quite...

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 1 month ago [\#217853](#217853) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[How to add Vote and Comments for whole directory?](/forum/4-how-to/82661-how-to-add-vote-and-comments-for-whole-directory#217853 "Can I add &quot;Vote and Comments&quot; not for single product, but for all category, where this product is located?")*

Hi,

Yes indeed, I was only talking about the vote, not the comments.

I think that the easiest solution will finally to do a custom plugin, not plugged on the mass actions.
And this plugin will be based on the function "onBeforeVoteCreate()" and/or "onBeforeVoteUpdate()".
So, there you have the whole element, the vote rating, the id of the product and the comment based on the vote type.

When this trigger is called, you can do a check on the categories of the product, get the other products of the same category and add the desired entries in the #__hikashop_vote table directly, and update the columns "product_average_score" and "product_total_vote" in the #__hikashop_product tables of the desired products.

That way the comments will be added to the other products of the same category, and the vote ratings updated.

Hope this make sense ![;)](/media/kunena/emoticons/24.png ";)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzgyNjYxLWhvdy10by1hZGQtdm90ZS1hbmQtY29tbWVudHMtZm9yLXdob2xlLWRpcmVjdG9yeT90bXBsPW1hcmtkb3du) 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.084 seconds

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