- Posts: 17
- Thank you received: 0
Votes and Comments
- sanket.pattekar
-
Topic Author
- Offline
Less
More
11 years 7 months ago #192410
by sanket.pattekar
Votes and Comments was created by sanket.pattekar
-- 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
-- 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.
11 years 7 months ago #192719
by Xavier
Replied by Xavier on topic Votes and Comments
Hi,
Thanks for the report, please replace the code:
By:
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.
Thanks for the report, please replace the code:
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);
}
Code:
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);
}
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.245 seconds