Add Member Only Pricing to PDPs

This guide shows you how to display a "Member Price" - for programs that leverage the Member Only Pricing benefit - on your product pages using Liquid. The member price is a discounted version of your standard price (e.g., 20% off), visible to all visitors.

Liquid Code to Output Member Price

Paste this snippet wherever you want the Member Price to appear. Comments are included for clarity and customization:

<div class="member-price-block">
  {%- comment -%}
    Calculate the member price by multiplying the product's base price by a discount factor.
    The '0.8' multiplier represents 20% off (e.g., 0.8 * $100 = $80).
    IMPORTANT: This is a placeholder — replace 0.8 with the appropriate value for your discount.
    For example, use 0.75 for 25% off, 0.7 for 30% off, etc.
  {%- endcomment -%}
  {% assign member_price = product.price | times: 0.8 | money %}

  {%- comment -%}
    Output the formatted member price. You can style this to match your theme.
  {%- endcomment -%}
  <p class="member-price" style="color: #008060; font-weight: bold;">
    Member Price: {{ member_price }}
  </p>
</div>

Option 1: Add via Theme Editor (Custom Liquid Block)

This method is ideal if your theme supports Online Store 2.0, which allows block-based customization.

Steps:

  1. Go to your Shopify admin: Online Store > Themes > Customize

  2. Navigate to a product page template (use the dropdown at the top).

  3. In the left sidebar, find your main Product Information section.

  4. Click “Add block” → Select “Custom Liquid”

  5. Paste the Member Price code into the Liquid block editor.

  6. Click Save.

You can drag the block to reorder it if needed.

Option 2: Edit the Product Template in Code

If you want more control or your theme does not support blocks, insert the code directly into your product template file.

Steps:

  1. Go to: Online Store > Themes > Actions > Edit Code

  2. Open the relevant template or section file. Common paths include:

    • templates/product.liquid

    • sections/main-product.liquid

    • sections/product-template.liquid

  3. Find the area near the default price output and paste the Liquid code provided.

  4. Save your changes and preview the product page.

How the Liquid Math Works

  • product.price returns the product's price in cents (e.g., $100 = 10000).

  • The | times: 0.8 filter multiplies that number by 0.8 (i.e., applies a 20% discount).

  • The | money filter converts the result back into a formatted currency string based on your store’s settings.

Adjusting the Discount

Change this line in the code:

{% assign member_price = product.price | times: 0.8 | money %}

To set a different discount, replace 0.8 with one of the following:

Discount Amount
Multiplier

10% off

0.9

20% off

0.8

25% off

0.75

30% off

0.7

50% off

0.5

Once completed, your result should appear on your product page where you've chosen to place it, similar to this:

Optional: Add a label or call-to-action below the price

<p class="member-note" style="font-size: 0.9em; color: #555;"> {%- comment -%} Verbiage, text styling & landing page URL are placeholders - replace them as needed {%- endcomment -%}
  Available for members. <a href="/community/membership" style="color: #008060;">Learn more</a>
</p>

Last updated

Was this helpful?