Votes and Comments

  • Posts: 17
  • Thank you received: 0
10 years 6 months ago #192410

-- url of the page with the problem -- : www.sscpl-india.com
-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.1

Hi

In my site I have the votes and comments connected. Also the comments are moderated, hence they are not displayed the moment the user posts it.

When the user posts the review on the product details page, they are seen under the Votes section. When the administrator then the publishes the same, then they are seen on the product details page,

My issue is
- When the user posts the comments and vote, the vote is seen directly on the product page.
- When the administrator approves the comment, then there is one more vote that is seen on the product page. This makes its 2 votes for one user input

My question is
- How can there be only one vote per user post. This should be seen only when the administrator approves the same

~Sanket

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

  • Posts: 13201
  • Thank you received: 2322
10 years 6 months ago #192719

Hi,

Thanks for the report, please replace the code:

					if($vElement->vote_type == 'product') {
						$type = new stdClass();
						$type->product_id = (int)$vElement->vote_ref_id;
						$type->product_average_score = $hikashop_vote_average_score_new;
						$type->product_total_vote = (int)$hikashop_vote_total_score_new;

						$typeClass->save($type,true);
					}
By:
					if($vElement->vote_type == 'product' && $vElement->vote_published) {
						$type = new stdClass();
						$type->product_id = (int)$vElement->vote_ref_id;
						$type->product_average_score = $hikashop_vote_average_score_new;
						$type->product_total_vote = (int)$hikashop_vote_total_score_new;

						$typeClass->save($type,true);
					}
In the file "administrator/components/com_hikashop/classes/vote.php", function "saveFrontend()".
We already have corrected that on our end and the fix will be available in the next release of HikaShop.

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

Time to create page: 0.178 seconds
Powered by Kunena Forum