doublesecretagency / craft-starratings

Star Ratings plugin for Craft CMS
Other
4 stars 3 forks source link

Half ratings not getting a different class #12

Closed simonkuran closed 4 years ago

simonkuran commented 4 years ago

Both when using do craft.starRatings.setIcons (with "full" or "4/4" syntax) and using the defaults the class doesn't change for half ratings. The Star Increment Size CP setting doesn't have any affect.

Screen Shot 2020-07-22 at 1 04 23 PM
{% do craft.starRatings.setIcons({
    'full'  : '<i class="fa 1 fa-star"></i>',
    'half'  : '<i class="fa 2 fa-star-half"></i>',
    'empty' : '<i class="fa 3 fa-star"></i>',
}) %}

<div class="recipe-stat-bar__item recipe-stat-bar__stars">
    {{ craft.starRatings.lockedStars(craft.starRatings.avgRating(entry.id)) }}
    {{ craft.starRatings.avgRating(entry.id) }}
</div>
lindseydiloreto commented 4 years ago

I just tested this locally, and everything seems to be working normally for me. Using the "Star Increment Size" dropdown in the plugin settings, I'm able to switch between all three display variations, and each of them is showing the correct number of full, half, and quarter icons respectively.

stars@2x

When I select "Quarter Stars", my page is indeed showing quarter stars. Ditto for "Half" and "Full".

I'm going to close this as I can't seem to reproduce it. If you're still having this problem, please DM me on Craft Discord.

simonkuran commented 4 years ago

Somehow it's working now even though that code hasn't changed. No idea what caused this. Sorry for the trouble!

lindseydiloreto commented 4 years ago

Ok great, glad it worked itself out. Thanks for reporting back! 👍