We're constantly trying to improve your support experience, and your feedback is extremely valuable to us.

Please take a moment to tell us about your experience today.
Sign up for future Help Center user research studies.

Displaying unit prices

If you sell products in quantities or measurements, then you might need to display the price per unit for certain products. When you enter a unit price for a product, the unit price is displayed on the product pages, collection pages, cart page, checkout pages, and order confirmation notifications.

Add unit prices to your product

Show unit prices on your online store

If you have added unit prices to your product but your unit prices are not appearing, then you might need to update your theme.

Steps:

  1. From your Shopify admin, go to Online Store > Themes.

  2. Click Actions > Edit code.

  3. Find the files that are responsible for your product pages and collection pages. Add the following snippet to each file:

{%- if variant.unit_price_measurement -%}
  {{ variant.unit_price | money }}
  {%- if variant.unit_price_measurement.reference_value != 1 -%}
    {{- variant.unit_price_measurement.reference_value -}}
  {%- endif -%}
  {{ variant.unit_price_measurement.reference_unit }}
{%- endif -%}
  1. Find the files that are responsible for your cart page. Add the following snippet to each file:
  {%- if item.unit_price_measurement -%}
    {{ item.unit_price | money }}
    {%- if item.unit_price_measurement.reference_value != 1 -%}
      {{- item.unit_price_measurement.reference_value -}}
    {%- endif -%}
    {{ item.unit_price_measurement.reference_unit }}
  {%- endif -%}
  1. Click Save.

  2. From your Shopify admin, go to Settings.

  3. Click Checkout.

  4. Go to Order processing on that page. Find Additional scripts and add the following snippet:

  {%- if line_item.unit_price_measurement -%}
    {{ line_item.unit_price | money }}
    {%- if line_item.unit_price_measurement.reference_value != 1 -%}
      {{- line_item.unit_price_measurement.reference_value -}}
    {%- endif -%}
    {{ line_item.unit_price_measurement.reference_unit }}
  {%- endif -%}
  1. Click Save.

Show unit prices in your order notifications

If you have added unit prices to your product but your unit prices are not appearing in your order confirmation notifications, then you might need to update your order notification template.

Steps:

  1. From your Shopify admin, go to Settings > Notifications.

  2. Click Order confirmation.

  3. Add the following snippet to the template:

  {%- if line_item.unit_price_measurement -%}
    {{ line_item.unit_price | money }}
    {%- if line_item.unit_price_measurement.reference_value != 1 -%}
      {{- line_item.unit_price_measurement.reference_value -}}
    {%- endif -%}
    {{ line_item.unit_price_measurement.reference_unit }}
  {%- endif -%}
  1. Click Save.

Ready to start selling with Shopify?

Try it free