Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Showing two prices on Shopify products

Showing two prices on Shopify products

younet
Shopify Partner
6 0 0

We offer a discounted price to our members which is automatically applied on checkout via tags but would like non-members to see this price listed below the full price on every product to entice them to become members.

Any customer without a membership can see the special discounted price for members, but they can only use that price if they become a member by purchasing a monthly or annual membership.

Is this possible?

 

See example here: houseofspoils.com/products/ted-gushue-happy-days

Replies 5 (5)

ADEcom
Tourist
5 1 2

Hi there,

do you have customer tagging enabled? If so you can implement liquid that changes pricing etc or add pricing similar to the below liquid code:

{% if customer.tags contains 'member' %}
<span class="price">{{ product.price | money }}</span>
{% else %}
<span class="price">{{ product.price | money }}</span>
<span class="discount-price">Members Price: {{ product.metafields.custom.member_price | money }}</span>
<p>Become a member to access this price!</p>
{% endif %}

In this example:

  • Members will see only the full price.
  • Non-members will see both the full price and the discounted member price, along with a message encouraging them to become a member.

    we have something similar with ex vat inc vat pricing, in which i am basing the above liquid from - i would advise with your theme developer on incorporating this.

    i can go into more detail if required, but hopefully this points you in the right direction
younet
Shopify Partner
6 0 0

Thank you for replying to this query so quickly @ADEcom 

 

This sounds like a good solution. We have all our members tagged 'Subscribers' so this could work.

 

Could you please go into more detail as to where in the code I would insert your example above?

tobebuilds
Shopify Partner
476 34 128

Most themes have a `price.liquid` or similarly-named template you can edit to control how prices display on your site.

 

The exact location highly depends on which theme you are using.

Founder, Regios Discounts app (4.9 stars, 68 reviews, Built for Shopify)
- Custom discounts made simple
- "Just about any discount you'll ever need"
- Built by an ex-Google software engineer
younet
Shopify Partner
6 0 0

Thanks @tobebuilds 

 

I'm using the Dawn theme.

younet
Shopify Partner
6 0 0

I added the below code to the price.liquid template and it worked perfectly. And added a little styling in base.css

 

<div class="price__regular">
{%- if product.quantity_price_breaks_configured? -%}
{%- if show_compare_at_price and compare_at_price -%}
{%- unless product.price_varies == false and product.compare_at_price_varies %}
<span class="visually-hidden visually-hidden--inline">
{{- 'products.product.price.regular_price' | t -}}
</span>
<span>
<s class="price-item price-item--regular variant-item__old-price">
{% if settings.currency_code_enabled %}
{{ compare_at_price | money_with_currency }}
{% else %}
{{ compare_at_price | money }}
{% endif %}
</s>
</span>
{%- endunless -%}
{%- endif -%}
<span class="visually-hidden visually-hidden--inline">{{ 'products.product.price.regular_price' | t }}</span>
<span class="price-item price-item--regular">
{{-
'products.product.volume_pricing.price_range'
| t: minimum: money_price_min, maximum: money_price_max
-}}
</span>
{%- else -%}
<span class="visually-hidden visually-hidden--inline">{{ 'products.product.price.regular_price' | t }}</span>
{% if template contains 'product' %}
<!-- On product pages, display REGULAR label with price -->
<span class="price-item price-item--regular">
<strong>REGULAR:</strong> {{ money_price }}
</span>
{% else %}
<!-- On collection pages, show just the price without REGULAR label -->
<span class="price-item price-item--regular">
{{ money_price }}
</span>
{% endif %}
{%- endif -%}
</div>

<!-- Member Price Section -->
{% if template contains 'product' %}
<div class="price__member">
<span class="visually-hidden visually-hidden--inline">Members Only Price</span>
<span class="price-item price-item--member">
<strong>MEMBER:</strong> {{ price | times: 0.9 | money }}
</span>
</div>
{% endif %}