Review Reward Program Metaobject
The Review Reward Program metaobject allows you to configure and manage rewards for customer reviews based on the type of review (text, photo, or video). This documentation covers how to access and use the metaobject in your Shopify store.
Accessing the Metaobject
To access the Review Reward Program metaobject in your Liquid templates, use the following code:
_10{%- assign review_program = shop.metaobjects.app--60169453569--review_reward_program.v2 -%}
Available Fields
The Review Reward Program metaobject contains the following fields:
Field Name | Type | Description |
---|---|---|
is_active | Boolean | Controls whether the review reward program is currently active |
text_reward | Money | Reward amount for text-only reviews |
photo_reward | Money | Reward amount for reviews with photos |
video_reward | Money | Reward amount for reviews with videos |
max_rewarded_reviews | Integer | Maximum number of reviews that can be rewarded per period |
reward_period_days | Integer | Length of the period in days for the review limit |
Example Usage
Here's a complete example of how to display the Review Reward Program settings in your Liquid template:
_42{%- comment -%} Review Reward Program {%- endcomment -%}_42{%- assign review_program = shop.metaobjects.app--60169453569--review_reward_program.v2 -%}_42{% if review_program %}_42<h2>Review Reward Program</h2>_42<table class="program-table">_42 <tr>_42 <th colspan="2">Program Status</th>_42 </tr>_42 <tr>_42 <td>Is Active</td>_42 <td>{{ review_program.is_active }}</td>_42 </tr>_42_42 <tr>_42 <th colspan="2">Reward Amounts</th>_42 </tr>_42 <tr>_42 <td>Text Review Reward</td>_42 <td>{{ review_program.text_reward.value | money }}</td>_42 </tr>_42 <tr>_42 <td>Photo Review Reward</td>_42 <td>{{ review_program.photo_reward.value | money }}</td>_42 </tr>_42 <tr>_42 <td>Video Review Reward</td>_42 <td>{{ review_program.video_reward.value | money }}</td>_42 </tr>_42_42 <tr>_42 <th colspan="2">Program Limits</th>_42 </tr>_42 <tr>_42 <td>Maximum Rewarded Reviews</td>_42 <td>{{ review_program.max_rewarded_reviews }}</td>_42 </tr>_42 <tr>_42 <td>Reward Period</td>_42 <td>{{ review_program.reward_period_days }} days</td>_42 </tr>_42</table>_42{% endif %}
Field Details
Field Name | Type | Purpose | Usage |
---|---|---|---|
is_active | Boolean | Controls the overall activation state of the referral program | Use this to conditionally enable or disable the entire review reward functionality |
text_reward | Money | Reward amount for text-only reviews | (*) |
photo_reward | Money | Reward amount for reviews with photos | (*) |
video_reward | Money | Reward amount for reviews with videos | (*) |
max_rewarded_reviews | Integer | Maximum number of reviews that can be rewarded per period | Works in conjunction with reward_period_days to limit rewards to X reviews per Y days |
reward_period_days | Integer | Length of the period in days for the review limit | Combined with max_rewarded_reviews to create a limit of X reviews per Y days (e.g., 3 reviews per 30 days) |
(*) Always use the money
filter with .value
(e.g., {{ review_program.text_reward.value | money }}
)
Best Practices
- Always check if the metaobject exists before accessing its properties:
_10{% if review_program %}_10 // Your code here_10{% endif %}
- Always use the money filter with .value for reward amounts:
_10{{ review_program.text_reward.value | money }}_10{{ review_program.photo_reward.value | money }}_10{{ review_program.video_reward.value | money }}
- Display reward tiers in ascending order:
_14<div class="reward-tiers">_14 <div class="tier">_14 <h3>Text Review</h3>_14 <p>Earn {{ review_program.text_reward.value | money }}</p>_14 </div>_14 <div class="tier">_14 <h3>Photo Review</h3>_14 <p>Earn {{ review_program.photo_reward.value | money }}</p>_14 </div>_14 <div class="tier">_14 <h3>Video Review</h3>_14 <p>Earn {{ review_program.video_reward.value | money }}</p>_14 </div>_14</div>