How to add Vote and Comments for whole directory?

  • Posts: 177
  • Thank you received: 5
11 years 6 months ago #105698

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

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

  • Posts: 13201
  • Thank you received: 2322
11 years 6 months ago #105724

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 or Create an account to join the conversation.

  • Posts: 177
  • Thank you received: 5
11 years 6 months ago #105725

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

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

  • Posts: 177
  • Thank you received: 5
9 years 9 months ago #189854

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 or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
9 years 9 months ago #190023

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 :)

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

  • Posts: 127
  • Thank you received: 6
9 years 1 month ago #217582

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: 9 years 1 month ago by Bobwales.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 1 month ago #217686

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 or Create an account to join the conversation.

  • Posts: 127
  • Thank you received: 6
9 years 1 month ago #217693

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 or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
9 years 1 month ago #217713

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 or Create an account to join the conversation.

  • Posts: 127
  • Thank you received: 6
9 years 1 month ago #217852

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 or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
9 years 1 month ago #217853

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 ;)

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

Time to create page: 0.089 seconds
Powered by Kunena Forum