Skip to content

Latest commit

 

History

History

Store Page Tag Rating

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Store Page Tag Rating

Synopsis

Add ratings to Store page products.

Version

  • 0.3.1

SS Version

  • 7.1

Fluid Engine Compatible

  • Not Applicable

Dependencies


Install

  • Install twcsl. After you install twcsl be sure to continue on with the rest of the steps.

  • Options

    • Store Page Specific

      • This option will be the one most will want to use if you have only a single store page you want to have this effect.

      • Add code from file store page tag rating.html to Store Settings > Advanced > Page Header Code Injection for the store page. Please see Per-page code injection. Read the code for any insptructions within.

    • Site-wide

      • This option is the one you want to use if you have multiple store pages where you want to have this effect.

      • Add code from file store page tag rating.html to Website > Pages > Website Tools > Code Injection > FOOTER. Please see Add code to code injection. Read the code for any instructions within.

How To Use

Lets say you have a site that sells bottles of wine. The bottles of wine have been rated by entities like Wine Spectator. A bottle of wine you sell received a rating of 4 out of 5 stars and you want to display that rating to your site visitors to encourage sales.

Edit the product and add a tag of twc-sptr Wine Spectator s 4/5. The twc-sptr indicates to the code that this is a rating. The entity text is the rating entity. The s tells the code you want to use the symbols set in the code. The numbers at the end are the rating and the scale.

Tag Syntax

  • twc-sptr

  • rating entity name

  • rating type : points, symbols, or words

    • use p, s, or w
  • rating : the rating/scale numbers or words

    • for r/s, note the forward slash separating the rating and scale
twc-sptr [ rating entity name here replacing square brackets ] [ rating type here replacing square brackets ] [ rating here replacing square brackets ]

Examples

twc-sptr Decanter p 9.5/10
twc-sptr Wine Spectator s 4/5
twc-sptr Wine Press Northwest w Platinum

Extra spaces or not following the format described will cause a rating to not be added to a product.

Classes

Some classes are provided for styling.

  • twc-sptr

    • rating

      • label

      • points, symbols, and words

        • point

        • scale

        • symbol, true ( filled symbols ), and false ( unfilled symbols )

          • overlay

Notes

This is not a site visitor rating system.

The rating type words can not represent symbols such as ★. Use the symbols rating type for symbols. For best result use number and letter characters.

Demo

You can see a demo of this effect here.

Make a Donation

Please consider making a donation.

Changes

  • 2023-12-01

    • fix for ratings jumble when product detail page when related products is enabled
    • removed user configurable rating destinations
    • bumped version to 0.3.1
  • 2023-08-20

    • add support for point ratings and words
    • bumped version to 0.3.0
  • 2023-07-28

    • sort tags, simple alpha
    • bumped version to 0.2.0
  • 2023-06-17

    • initial version