[SOLVED] Hide grey voting stars for guests
- nico.van.leeuwen
-
Topic Author
- Offline
Less
More
8 years 6 months ago - 8 years 6 months ago #289280
by nico.van.leeuwen
[SOLVED] Hide grey voting stars for guests was created by nico.van.leeuwen
-- HikaShop version -- : 3.3.0
-- Joomla version -- : 3.8.5
Hi,
We allow only registered people to vote.
How hard would it be to hide the grey stars for people who are not logged in?
Could this done by applying a different style when people are a guest?
Or maybe there is a way to accomplish this in Hikashop in a different way?
Thanks,
Nico
-- Joomla version -- : 3.8.5
Hi,
We allow only registered people to vote.
How hard would it be to hide the grey stars for people who are not logged in?
Could this done by applying a different style when people are a guest?
Or maybe there is a way to accomplish this in Hikashop in a different way?
Thanks,
Nico
Last edit: 8 years 6 months ago by nico.van.leeuwen. Reason: solved
Please Log in or Create an account to join the conversation.
8 years 6 months ago #289289
by nicolas
Replied by nicolas on topic Hide grey voting stars for guests
Hi,
I've checked your link but I don't see any grey star on your product pages.
So I'm not sure what you're talking about.
Could you provide more details please ?
I've checked your link but I don't see any grey star on your product pages.
So I'm not sure what you're talking about.
Could you provide more details please ?
Please Log in or Create an account to join the conversation.
- nico.van.leeuwen
-
Topic Author
- Offline
8 years 6 months ago #289325
by nico.van.leeuwen
Replied by nico.van.leeuwen on topic Hide grey voting stars for guests
Hi Nicolas,
Ik mean the same grey stars/votes as on your demo page :
demo.hikashop.com/index.php/en/hikashop/...sting/display-in-div
The grey stiletto's don't have any votes so there are 5 grey stars.
If this is the case the customer would like to hide them for "guests" and only show the yellow stars.
It would not be a problem to hide the grey stars in general but then you cannot vote anymore
Ik mean the same grey stars/votes as on your demo page :
demo.hikashop.com/index.php/en/hikashop/...sting/display-in-div
The grey stiletto's don't have any votes so there are 5 grey stars.
If this is the case the customer would like to hide them for "guests" and only show the yellow stars.
It would not be a problem to hide the grey stars in general but then you cannot vote anymore
Please Log in or Create an account to join the conversation.
8 years 6 months ago #289340
by nicolas
Replied by nicolas on topic Hide grey voting stars for guests
Hi,
Add the code:
after the line:
in the view file vote / mini.php and people who can't vote won't see stars on products without any vote.
You can then restrict the voting to registered users with the "Choose the access level for votes or comments" setting.
Add the code:
Code:
if(!$canVote && $row->hikashop_vote_total_vote == '0'){
echo '<div class="hikashop_vote_stars">'.JText::_('HIKA_NO_VOTE').'</div>';
return;
}
Code:
$canVote = $voteAccess == 'public' || ($voteAccess == 'registered' && !empty($user)) || ($voteAccess == 'buyed' && $hasBought);
You can then restrict the voting to registered users with the "Choose the access level for votes or comments" setting.
Please Log in or Create an account to join the conversation.
- nico.van.leeuwen
-
Topic Author
- Offline
8 years 6 months ago #289360
by nico.van.leeuwen
Replied by nico.van.leeuwen on topic Hide grey voting stars for guests
Hi Nicolas,
That brilliant, thanks !
That brilliant, thanks !
Please Log in or Create an account to join the conversation.
Time to create page: 0.154 seconds