Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi,
We offer refills on certain products and while we have relied on customer integrity up to this point, we keep getting new customers trying to purchase refills at the slightly discounted price of the actual product. How can we restrict this only to customers who have already ordered the full priced product?
You would need to enable customer accounts and let customers know they need to be logged in to order refills.
On the product page template you would then add code to conditionally enable the purchase button only if a customer is logged in.
{% if customer %} Normal add to cart/quick pay button stuff {% else %} This customer is not logged in - show a message with prompt to log in. {% endif %}
To only do this for customers that have purchased a particular item you can use customer tags.
Did you get this to work the way you wanted it to? I am trying to implement the exact same system but am having some trouble.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025