All things Shopify and commerce
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.
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:
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?
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.
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 %}
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024