Home

memberr Shopify Metafields

memberr uses Shopify shop metafields to store important configuration and settings. These metafields are accessible through the Shopify Admin API and Storefront API.

Accessing Shop Metafields

To access shop metafields in your liquid templates, use the following code:


_10
{%- assign memberr = shop.metafields.app--60169453569--memberr_v2 -%}
_10
{% if memberr %}
_10
<p>{{ memberr.FIELD_NAME }}</p>
_10
{% endif %}

Available Metafields

KeyTypeAccessDescription
organization_idTextPublic ReadUnique identifier for the organization in the memberr system.
organization_currencyTextPublic ReadCurrency code used by the organization.
exchange_rateMoneyPublic ReadExchange rate for currency conversion.
public_keyTextPublic ReadPublic API key for memberr integration.
secret_keyTextPrivateSecret API key for memberr integration (not accessible in storefront).

Access Levels

The metafields have different access levels depending on the context:

  • Public Read: Accessible in both Admin and Storefront APIs
  • Private: Only accessible through the Admin API
  • None: Not accessible

Best Practices

Always check if metafields exist before accessing:


_10
{% if shop.metafields.app--60169453569--memberr_v2.organization_id %}
_10
<!-- Use organization ID -->
_10
{% endif %}

Parse dates appropriately:


_10
{{ membership.created_at | date: "%Y-%m-%d" }}

Handle money values appropriately:


_10
{% if shop.metafields.app--60169453569--memberr_v2.exchange_rate %}
_10
{{ shop.metafields.app--60169453569--memberr_v2.exchange_rate.value | money }}
_10
{% endif %}