company logo

Help center

All collectionsVolume PricingCode ExamplesCreating a Custom Volume Pricing Block

Creating a Custom Volume Pricing Block

Use the app’s metafield data to design your own volume pricing display or custom component.

Saul Sampson·September 8, 2026

Overview

The MNML Volume Pricing app stores all tier data in Shopify metafields, allowing you to build your own layouts or theme components using the same information shown by the widget.

  • On the Standard Plan, metafields are created at the product level.

  • On the Pro Plan, metafields are also available at the variant level, giving full control when each variant has its own pricing structure.

You can access this data through Liquid, the Storefront API, or GraphQL, and display it anywhere on your product page.


Metafield Details

Field

Value

Namespace

mnml

Key

volume_pricing_tiers

Type

JSON

Scope

Product (Standard Plan) / Variant (Pro Plan)

Each metafield contains an array of tier objects representing quantity thresholds, prices, and optional labels.

Tier Object Fields

Field

Type

Description

qty

Integer

Minimum quantity to trigger this tier

price

Number

Discount value (see note below)

type

String

Either "amount" or "percentage"

badge

String

Optional label (e.g., "Best Value")

Price values:

  • For "amount" type: stored in cents (e.g., 500 = $5.00 off per unit)

  • For "percentage" type: stored as the percentage value (e.g., 10 = 10% off)

Combine Variant Quantities: When combineVariantQuantities is true, quantities of all variants are counted together toward tier thresholds.


Example JSON (Fixed Price Example)

{
  "combineVariantQuantities": true,
  "tiers": [
    { "qty": 10, "price": 500, "type": "amount", "badge": "" },
    { "qty": 25, "price": 800, "type": "amount", "badge": "" },
    { "qty": 50, "price": 1200, "type": "amount", "badge": "Best Value" }
  ]
}

Prices are stored in minor units (e.g. 5000 = £50.00).

Example JSON (Percentage Discount Example)

{
  "combineVariantQuantities": false,
  "tiers": [
    { "qty": 5, "price": 5, "type": "percentage", "badge": "" },
    { "qty": 10, "price": 10, "type": "percentage", "badge": "10% Off" },
    { "qty": 25, "price": 15, "type": "percentage", "badge": "Best Deal" }
  ]
}

Example Liquid Snippet (List)

{% assign tiers = product.metafields.mnml.volume_pricing_tiers.value %}
{% if tiers %}
  <div class="custom-volume-pricing">
    <h4>Volume Discounts</h4>
    <ul>
      {% for tier in tiers %}
        <li>
          Buy {{ tier.qty }}+ — 
          {% if tier.type == 'percentage' %}
            {{ tier.price }}% off
          {% else %}
            {{ tier.price | divided_by: 100.0 | money }} off
          {% endif %}
          {% if tier.badge %}
            <span class="tier-badge">{{ tier.badge }}</span>
          {% endif %}
        </li>
      {% endfor %}
    </ul>
  </div>
{% endif %}

This example displays a simple list of pricing tiers. You can style or expand this however you wish, including highlighting the active tier or integrating it into your theme’s layout.

Example Liquid Snippet (Table)

{% assign tiers = product.metafields.mnml.volume_pricing_tiers.value %}
{% if tiers %}
  <div class="custom-volume-pricing">
    <h4>Volume Discounts</h4>
    <table class="volume-pricing-table">
      <thead>
        <tr>
          <th>Quantity</th>
          <th>Discount</th>
        </tr>
      </thead>
      <tbody>
        {% for tier in tiers %}
          <tr>
            <td>{{ tier.qty }}+</td>
            <td>
              {% if tier.type == 'percentage' %}
                {{ tier.price }}% off
              {% else %}
                {{ tier.price | divided_by: 100.0 | money }} off
              {% endif %}
              {% if tier.badge %}
                <span class="tier-badge">{{ tier.badge }}</span>
              {% endif %}
            </td>
          </tr>
        {% endfor %}
      </tbody>
    </table>
  </div>
{% endif %}

This example displays a pricing tiers table. You can style or expand this however you wish, including highlighting the active tier or integrating it into your theme’s layout.


Working with Variant-Level Pricing

If you're using variant-level pricing (Pro Plan), you'll need to update your custom display when a customer selects a different variant.

Accessing Variant Metafields

To display variant-specific tiers, reference the variant metafield instead of the product metafield:

{% assign current_variant = product.selected_or_first_available_variant %}
{% assign tiers = current_variant.metafields.mnml.volume_pricing_tiers.value %}

{% comment %} Fallback to product-level if no variant tiers exist {% endcomment %}
{% if tiers == blank %}
  {% assign tiers = product.metafields.mnml.volume_pricing_tiers.value %}
{% endif %}

Reloading on Variant Change

When a customer selects a different variant, your custom pricing table won't automatically update - it requires JavaScript to detect the variant change and reload the content.

This is an advanced customisation that varies depending on your theme. Each Shopify theme handles variant selection differently, so the JavaScript required to listen for changes and refresh your pricing display will be specific to your theme's implementation.

Common approaches include:

  • Listening for the theme's variant change event

  • Using Shopify's Section Rendering API to reload the block

  • Fetching variant metafield data via the Storefront API

Need help? If you're using variant-level pricing and need assistance setting up dynamic reloading for your custom block, reach out to our support team. We're happy to help you get it working with your specific theme.


Notes

  • Product-level metafields are available to all users.

  • Variant-level metafields require the Pro Plan.

  • Variant data overrides product-level data when both are present.

  • Prices are stored as integers in minor units, so convert to your shop’s currency before displaying.

  • Any updates made through the MNML app automatically sync to these metafields.

Did this answer your question?
😞
😐
😁