ProductRichData - Liquid Object Reference
On this page
Description
The ProductRichData object holds the Product values that StoreConnect publishes as schema.org structured data on product pages. Reach it through product.rich_data, for example {{ product.rich_data.color }}. Each attribute reads the Product field of the same name, so a blank field returns blank.
The fifteen fields added for structured data are available only here. The older fields it also covers (condition, upc, and the shipping weight, dimensions, and their units) are on the Product object as well.
Attributes
| Attribute | Type | Description |
|---|---|---|
best_rating |
Number | Returns the top of the rating scale for the Product’s reviews; blank means 5 in structured data |
color |
String | Returns the Product’s color, kept in step with a Color trait when it has one |
condition |
String | Returns the value of the Condition attribute |
material |
String | Returns the Product’s material, kept in step with a Material trait when it has one |
pattern |
String | Returns the Product’s pattern, kept in step with a Pattern trait when it has one |
rating_value |
Number | Returns the Product’s aggregate review rating |
restocking_fee |
Number | Returns the fee charged when the Product is returned, in the Store’s currency |
return_policy_category |
String | Returns the schema.org return policy category for the Product, for example MerchantReturnFiniteReturnWindow |
return_policy_country |
String | Returns the two-letter ISO 3166-1 country the Product’s return policy applies to |
return_window_days |
Number | Returns the number of days the Product can be returned within |
review_count |
Number | Returns the number of reviews behind the Product’s rating |
shipping_charges |
String | Returns how shipping is charged for the Product in structured data: Free, Billed, or blank |
shipping_cost |
Number | Returns the flat shipping cost published for the Product in structured data |
shipping_dimensions_unit |
String | Returns the unit of measure for the Product’s shipping dimensions |
shipping_height |
Number | Returns the Product’s shipping height |
shipping_length |
Number | Returns the Product’s shipping length |
shipping_weight |
Number | Returns the Product’s shipping weight |
shipping_weight_unit |
String | Returns the unit of measure for the Product’s shipping weight |
shipping_width |
Number | Returns the Product’s shipping width |
size |
String | Returns the Product’s size, kept in step with a Size trait when it has one |
upc |
String | Returns the value of the UPC attribute |
warranty_duration |
Number | Returns the length of the Product’s warranty, in warranty_unit units |
warranty_unit |
String | Returns the UN/CEFACT unit code of warranty_duration, for example MON or ANN |
Example
This example shows a product’s color and size only when they are set:
```liquid
{% if product.rich_data.color != blank %}
Color: {{ product.rich_data.color }}
{% endif %} {% if product.rich_data.size != blank %}
Size: {{ product.rich_data.size }}
{% endif %} ```
Available on
- Product - Liquid Object Reference —
rich_data
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.