Referrals Referral Page
When combining memberr Store Credit with Referrals, users experience a direct & tangible benefit by recommending friends and acquaintances.
Accessing the Metaobject
To access the Referral Program metaobject in your liquid templates, use the following code:
_10{%- assign referral_program = shop.metaobjects.app--60169453569--referral_program.v2 -%}
Available Fields
The Referral Program metaobject contains the following fields:
Field Name | Type | Description |
---|---|---|
is_active | Boolean | Controls whether the referral program is currently active |
referring_customer_gets_type | Text | Type of reward for referring customer ('PERCENTAGE' or 'FIXED') |
referring_customer_gets_value_percentage | Decimal | Percentage reward for referring customer |
referring_customer_gets_value_money | Money | Fixed amount reward for referring customer |
referring_customer_expiry_days | Integer | Days until referring customer's reward expires |
referring_customer_availability_delay_days | Integer | Days before referring customer's reward becomes available |
referred_customer_gets_type | Text | Type of reward for referred customer ('PERCENTAGE', 'FIXED' or 'FREE_SHIPPING') |
referred_customer_gets_value_percentage | Decimal | Percentage reward for referred customer |
referred_customer_gets_value_money | Money | Fixed amount reward for referred customer |
referred_customer_minimum_order_value | Money | Minimum order value required for referred customer |
referred_customer_must_be_new_customer | Boolean | Whether the referred customer must be new |
cookie_duration_in_days | Integer | Duration of the referral tracking cookie |
Example Usage
Here's a complete example of how to display the Referral Program settings in your Liquid template:
_68{%- comment -%} Referral Program {%- endcomment -%}_68{%- assign referral_program = shop.metaobjects.app--60169453569--referral_program.v2 -%}_68{% if referral_program %}_68<h2>Referral Program</h2>_68<table class="program-table">_68 <tr>_68 <th colspan="2">Program Status</th>_68 </tr>_68 <tr>_68 <td>Is Active</td>_68 <td>{{ referral_program.is_active }}</td>_68 </tr>_68_68 <tr>_68 <th colspan="2">Referring Customer Rewards</th>_68 </tr>_68 <tr>_68 <td>Reward Type</td>_68 <td>{{ referral_program.referring_customer_gets_type }}</td>_68 </tr>_68 {% if referral_program.referring_customer_gets_type == 'PERCENTAGE' %}_68 <td>Reward Amount</td>_68 <td>{{ referral_program.referring_customer_gets_value_percentage }}%</td>_68 {% elsif referral_program.referring_customer_gets_type == 'FIXED' %}_68 <td>Reward Amount</td>_68 <td>{{ referral_program.referring_customer_gets_value_money.value | money }}</td>_68 {% endif %}_68 <tr>_68 <td>Expiry Days</td>_68 <td>{{ referral_program.referring_customer_expiry_days }}</td>_68 </tr>_68 <tr>_68 <td>Availability Delay</td>_68 <td>{{ referral_program.referring_customer_availability_delay_days }}</td>_68 </tr>_68_68 <tr>_68 <th colspan="2">Referred Customer Rewards</th>_68 </tr>_68 <tr>_68 <td>Reward Type</td>_68 <td>{{ referral_program.referred_customer_gets_type }}</td>_68 </tr>_68 {% if referral_program.referred_customer_gets_type == 'PERCENTAGE' %}_68 <td>Reward Amount</td>_68 <td>{{ referral_program.referred_customer_gets_value_percentage }}%</td>_68 {% elsif referral_program.referred_customer_gets_type == 'FIXED' %}_68 <td>Reward Amount</td>_68 <td>{{ referral_program.referred_customer_gets_value_money.value | money }}</td>_68 {% endif %}_68 <tr>_68 <td>Minimum Order Value</td>_68 <td>{{ referral_program.referred_customer_minimum_order_value.value | money }}</td>_68 </tr>_68 <tr>_68 <td>Must Be New Customer</td>_68 <td>{{ referral_program.referred_customer_must_be_new_customer }}</td>_68 </tr>_68_68 <tr>_68 <th colspan="2">Program Settings</th>_68 </tr>_68 <tr>_68 <td>Cookie Duration</td>_68 <td>{{ referral_program.cookie_duration_in_days }} days</td>_68 </tr>_68</table>_68{% endif %}
Accounts Page
For Shopify Customer Accounts memberr offers a simple drag-&-drop element that can be accessed through the Shopify theme editor.
