Anybody can vote, despite access level

  • Posts: 17
  • Thank you received: 0
8 years 3 months ago #225411

-- url of the page with the problem -- : www.sikringspartner.no/brannslukking
-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.8
-- PHP version -- : 5.3.29
-- Browser(s) name and version -- : Chrome & Mozilla Firefox

I chose in the configuration:
"Choose which module you want to enable": Vote & Comment
"Choose the access level for votes or comments": Registered

And still anybody can vote, registered or not.... :(

Did I miss any further configuration regarding voting?

But you have to be registered to comment... So that part workes... :)


Best regards
Christin Bjørnrud

www.itweb.no - www.sikringspartner.no - www.bjornrud.no
Last edit: 8 years 3 months ago by ChristinB.

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
8 years 3 months ago #225412

Hi,

And still anybody can vote, registered or not....

But you have to be registered to comment... So that part workes...


I'm sorry but I'm not able to understand your issue.
Is it working or not ? If not ; what is really the issue ?

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 17
  • Thank you received: 0
8 years 3 months ago #225438

I only want registered users to be able to vote... :)

And I set the configuration to be:
"Choose which module you want to enable": Vote & Comment
and
"Choose the access level for votes or comments": Registered

And it doesn't work... Anybody can vote... :(


Best regards
Christin Bjørnrud

www.itweb.no - www.sikringspartner.no - www.bjornrud.no

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
8 years 3 months ago #225449

Hi,

I've had a look on your website but I don't see the interface to post a comment even thought I'm not logged in:
take.ms/FwwNq
So it seems to be working no ?

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

  • Posts: 17
  • Thank you received: 0
8 years 3 months ago #225465

I thought voting was giving out the stars, not commenting....

We disabled comments if you're not logged in....

But we don't want just anybody to be able to click on the stars (vote)... We only want logged in customers to be able to do so...

www.sikringspartner.no/brannslukking
and
www.sikringspartner.no/brannslukking/pro...-110-slukkeskum-4-pk

Look next to the price, not at the bottom of the page.. :)

(PS. We have upgraded to Essential, if that has anything to say... )


Best regards
Christin Bjørnrud

www.itweb.no - www.sikringspartner.no - www.bjornrud.no
Last edit: 8 years 3 months ago by ChristinB.

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

  • Posts: 13201
  • Thank you received: 2322
8 years 3 months ago #225497

Hi,

I just went on your website and as I was not logged in, I was not able to vote or comment.
So it seems that you have set it up as desired.

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

  • Posts: 17
  • Thank you received: 0
8 years 3 months ago #225504

Please try again... :)

Now the settings are:

"Choose which module you want to enable": Vote & Comment
and
"Choose the access level for votes or comments": Registered


Best regards
Christin Bjørnrud

www.itweb.no - www.sikringspartner.no - www.bjornrud.no

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

  • Posts: 13201
  • Thank you received: 2322
8 years 3 months ago #225508

Hi,

There was indeed an issue, please edit the view "vote / mini" and add the code:

// Checks on vote access
$voteAccess = $config->get('access_vote','public');
$user = (!is_null(hikashop_loadUser()))?hikashop_loadUser():false;
$hasBought = false;
if($voteAccess == 'buyed' && $user){
	$voteClass = hikashop_get('class.vote');
	$hasBought = $voteClass->hasBought($row->vote_ref_id, $user);
}
$canVote = $voteAccess == 'public' || ($voteAccess == 'registered' && $user) || ($voteAccess == 'buyed' && $hasBought);

After:
if($row->vote_enabled != 1)
	return;

And replace:
if($config->get('enable_status_vote', 'vote') != 'both') {
By:
if($config->get('enable_status_vote', 'vote') != 'both' &&  $canVote) {

The following user(s) said Thank You: ChristinB

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

  • Posts: 17
  • Thank you received: 0
8 years 3 months ago #225562

Thank you! Now it works! :)


Best regards
Christin Bjørnrud

www.itweb.no - www.sikringspartner.no - www.bjornrud.no
Last edit: 8 years 3 months ago by ChristinB.

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

  • Posts: 17
  • Thank you received: 0
8 years 3 months ago #225563

But it seems we still have an issue with the voting system. Because when we delete the votes (in admin: Customers > Vote) they are deleted from that list, but not from the product it self. So it's still visible to all visitors...

Du you have a solution for that too? :)


Best regards
Christin Bjørnrud

www.itweb.no - www.sikringspartner.no - www.bjornrud.no

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

  • Posts: 13201
  • Thank you received: 2322
8 years 3 months ago #225593

Hi,

I just tried to reproduce that issue on my local, and indeed when deleting a vote directly the value is not removed on the product side. But this has been already fixed for the next release of HikaShop, as we changed many things in the way the votes are managed.

So please wait until the next release which should arrive soon :)

The following user(s) said Thank You: ChristinB

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

  • Posts: 17
  • Thank you received: 0
8 years 3 months ago #225610

Thank you! :)


Best regards
Christin Bjørnrud

www.itweb.no - www.sikringspartner.no - www.bjornrud.no

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

  • Posts: 13201
  • Thank you received: 2322
8 years 3 months ago #225612

Before this release, for the current votes you can unpublish them before deleting them.
That way everything will be working as expected.

The following user(s) said Thank You: ChristinB

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

  • Posts: 1119
  • Thank you received: 114
8 years 3 months ago #225661

Any eta when it will be released?

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

  • Posts: 13201
  • Thank you received: 2322
8 years 3 months ago #225672

Hi,

We can't give a date for now, but should be in January

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

Time to create page: 0.105 seconds
Powered by Kunena Forum