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

#   Votes and Comments

##

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

Less More

- Posts: 17
- Thank you received: 0
-
-

11 years 7 months ago [\#192410](#192410) by [sanket.pattekar](/forum/user/35472-sanket-pattekar "View sanket.pattekar's Profile")  *[Votes and Comments](/forum/26-product-category-display/875292-votes-and-comments#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")* was created by *[sanket.pattekar](/forum/user/35472-sanket-pattekar "View sanket.pattekar's Profile")*

-- url of the page with the problem -- : [ www.sscpl-india.com](http://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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzUyOTItdm90ZXMtYW5kLWNvbW1lbnRzP3RtcGw9bWFya2Rvd24=) 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 7 months ago [\#192719](#192719) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Votes and Comments](/forum/26-product-category-display/875292-votes-and-comments#192719 "-- 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")*

Hi,

Thanks for the report, please replace the code: Code:

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

By: Code:

if($vElement-&gt;vote_type == 'product' &amp;&amp; $vElement-&gt;vote_published) { $type = new stdClass(); $type-&gt;product_id = (int)$vElement-&gt;vote_ref_id; $type-&gt;product_average_score = $hikashop_vote_average_score_new; $type-&gt;product_total_vote = (int)$hikashop_vote_total_score_new; $typeClass-&gt;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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzUyOTItdm90ZXMtYW5kLWNvbW1lbnRzP3RtcGw9bWFya2Rvd24=) 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.129 seconds

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

[](#top)
