Additional attributes
Show extra slider ratings like fit, quality or comfort, imported with your reviews, with every product.
Some review apps ask reviewers to rate specific qualities on a slider, besides the stars: "How does it fit?", "How is the quality?". 5zero calls each question an attribute. It imports the answers with the reviews and shows them: every answer with its review, and the average per product, so a shopper sees at a glance that a shoe runs small.
Today the answers come from REVIEWS.io imports. 5zero's own review forms do not ask attribute questions.
The attributes in the app
5zero creates an attribute for every slider question it finds in your REVIEWS.io reviews, on the first import. You see and edit them on the app's Collect page under Settings → Additional attributes. Each one is a slider with:
- Question: what the reviewer answers, like "How does it fit?".
- Label: a short name shown with the results, like "Fit".
- Left, center and right labels: the meaning of the slider's ends and middle, like "Runs small", "True to size" and "Runs large".
- Scale minimum and maximum: the range of the slider.
Edit the labels to change how the results read on your storefront. Each attribute has an ID, shown on the attributes page, which you need to choose attributes in the review list.
The structure of the data also has room for other types, like star ratings or multiple choice, for imports that bring them.
Showing the results
The Review List shows the average of each attribute in its summary, and each review's answers with the review. To show only some attributes, or change their order, enter their IDs in the list's Attribute ids to display setting, comma-separated.
Data
Attributes are stored in three places. Their full structure is in the reference:
review_attribute_definitionson the shop: the questions, labels and options, in every shop language.additional_attributeson products, variants, the shop, customers and orders: the averages of the answers.additional_attributeson each review'sreview_meta: the reviewer's own answers.
Examples
Fit slider
Each product has the averages in additional_attributes, and the shop has the questions and labels in review_attribute_definitions, in every shop language. This draws one marker per slider attribute. Each example brings the CSS for exactly the look of its preview, scoped to its own classes so it does not touch the rest of your theme. Only the font and the text color come from your theme. The stars (fo-stars) need 5zero's star styles on the page, which every 5zero block and the Card Rating app embed load.
Fit
{%- assign fiveoh = product.metafields['app--324569563137'] -%}
{%- assign defs = shop.metafields['app--324569563137'].review_attribute_definitions.value -%}
{%- assign lang = request.locale.iso_code -%}
{%- for item in fiveoh.additional_attributes.value.items -%}
{%- if item.type == 'slider_rating' -%}
{%- for d in defs.items -%}
{%- if d.attribute_id == item.attribute_id -%}{%- assign def = d -%}{%- endif -%}
{%- endfor -%}
{%- assign range = def.scale_max | minus: def.scale_min -%}
{%- assign percent = item.value | minus: def.scale_min | times: 100.0 | divided_by: range | round -%}
<div class="reviews-fit">
<p class="reviews-fit__label">{{ def.label[lang] | default: def.label[defs.primary_locale] }}</p>
<div class="reviews-fit__track"><span class="reviews-fit__marker" style="left: {{ percent }}%"></span></div>
<div class="reviews-fit__scale">
<span>{{ def.scale_labels.left[lang] | default: def.scale_labels.left[defs.primary_locale] }}</span>
<span>{{ def.scale_labels.right[lang] | default: def.scale_labels.right[defs.primary_locale] }}</span>
</div>
<small>{{ item.count }} reviews</small>
</div>
{%- endif -%}
{%- endfor -%}The texts are in English to keep the code short. Other languages
Both are described in the reference.
Troubleshooting
- Reviews have no answers: answers come only from sources that collect them, like REVIEWS.io.