Mastering One-Time Product Purchases & Variable Discounts on Shopify: Community Insights
Hey store owners! Ever found yourself scratching your head trying to set up a special offer where a customer can only buy a specific product once, or where the discount changes based on the options they pick? You're not alone! This exact challenge recently popped up in the Shopify Community, and the discussion was packed with some really smart insights. Our original poster, @sed0481, asked if these tricky scenarios could be handled without paid apps, specifically for both members and non-members.
Let's dive into what the community experts had to say and break down how you can tackle these situations, leveraging both native Shopify features and when you might need to consider an app.
The "One Purchase Per Customer" Puzzle
This is a common request for promotions, exclusive products, or introductory offers. The good news is, for logged-in customers, Shopify has a built-in feature that gets you pretty close.
Native Shopify Discount Code Limitation
As @Mustafa_Ali pointed out, you can create a discount code and check the "Limit to one use per customer" box. This works by matching the customer's email address. It's great for your regular, logged-in customers, but here's the catch:
- Guest Customers Are Tricky: Both @Easify-Jennifer and @Ellie-BOGOS highlighted that Shopify's native feature doesn't reliably prevent guest customers (those who don't log in or create an account) from reusing the discount with a different email address. @Ploqo and @devcoders also echoed this, emphasizing that Shopify can't reliably identify the same guest across multiple orders.
A Stricter Native Workaround (for Logged-In Customers)
If you absolutely need to block repeat purchases for logged-in customers, @Ploqo and @devcoders suggested a clever combination of Shopify Flow and Liquid code. This requires customers to have an account and be logged in.
Step-by-Step for Logged-In Customer Purchase Limit:
- Require Customer Accounts: Go to Settings > Customer accounts and ensure customer accounts are required for checkout.
- Create a Shopify Flow:
- Go to Shopify Admin > Flow.
- Create a new workflow.
- Trigger:
Order created. - Condition: Add a condition like
Order > Line items > Any line item > Product title = [Your Specific Product Name]. - Action:
Add customer tag. Choose a unique tag, likebought-one-time-product.
- Modify Your Product Template (Liquid):
- Go to Online Store > Themes > Actions > Edit code.
- Find your product template file (often
main-product.liquidorproduct-template.liquidunder Sections). - Locate the code for your 'Add to Cart' button (it usually contains
). - Wrap the buy button and quantity selector with a Liquid condition that checks for the customer tag. It might look something like this (this is a simplified example, always test thoroughly!):
{% if customer %} {% if customer.tags contains 'bought-one-time-product' %}You've already purchased this item!
{% else %} {% endif %} {% else %}Please log in or create an account to purchase.
{% endif %}
This setup will hide the buy button for logged-in customers who have previously purchased the tagged product. Remember, this doesn't stop a determined guest from creating a new account or using a different email.
Tackling Variable Discounts by Option
The original poster wanted discounts like A=$300, B=$500, C=$800, D=$1000, based on selected options. This is where it gets interesting!
The "Proportional Pricing" Trick (Native Workaround)
@Ploqo shared a brilliant native workaround if your desired discount amounts are proportional. The idea is to adjust your product variant base prices so a single percentage discount yields the exact fixed amounts you want.
Step-by-Step for Proportional Variable Discounts:
- Turn Options into Variants: If your A/B/C/D are custom options, you'll need to set them up as product variants in Shopify.
- Price Your Variants Strategically:
- Determine a common percentage. For discounts of 300, 500, 800, 1000, a 10% discount works perfectly if your base prices are 3000, 5000, 8000, and 10000 respectively.
- Set the variant prices (e.g., Variant A = ¥3,000, Variant B = ¥5,000, Variant C = ¥8,000, Variant D = ¥10,000).
- Create One Discount Code:
- Go to Shopify Admin > Discounts > Create discount.
- Choose Amount off products.
- Set Discount value to Percentage,
10%. - Under Applies to, select Specific products and pick the product in question.
- Limit Use (Optional, but recommended for one-time offers):
- Under Maximum discount uses, tick Limit to one use per customer.
This method is elegant because it uses a single discount code, simplifying management. However, as @Ellie-BOGOS noted, it might not be practical if your original product prices are already fixed and can't be adjusted.
Other Native & Custom Options for Variable Discounts
- Multiple Discount Codes: @Mustafa_Ali suggested creating four separate discount codes (one for each variant A/B/C/D), each with its own fixed amount and "one use per customer" checked. This works but means more codes to manage.
- Shopify Functions (Code Required): @Ploqo mentioned that if your discount amounts aren't proportional, a custom Shopify Function could be used. This is a free, powerful tool but requires coding expertise.
- Customer Tags & Custom Logic: @devcoders proposed using customer tags with custom logic to handle different discounts based on options. This also leans into custom development.
When Apps Become Your Best Friend
If the native workarounds feel too complex, or if your discount amounts aren't proportional, an app might be the way to go. @Easify-Jennifer recommended apps like Easify Custom Product Options for managing custom options with different pricing. @Ellie-BOGOS also highlighted discount apps that can:
- Apply fixed amount discounts per variant directly.
- Offer stricter "one use per customer" rules for guests by checking email at checkout (though still not 100% foolproof against multiple email addresses).
- Allow discounts to be visible only via a specific link.
Apps like Order Limits, MinMaxify, or tiered discount apps (as mentioned by @Ploqo) can also add more sophisticated control over product purchases.
The Reality Check: The Guest Customer Conundrum
The core challenge, as virtually everyone in the thread agreed, is reliably limiting purchases for guest customers. Shopify's native platform doesn't have a foolproof way to identify a guest who uses different email addresses or devices. While some apps offer an extra layer of email checking, the most secure method for a strict "one-time purchase" is always to require customer accounts and leverage the Shopify Flow/Liquid workaround for logged-in users.
Ultimately, the best approach depends on how strict your "one-time purchase" rule needs to be and how flexible your pricing structure is. For logged-in customers, Shopify offers some robust native solutions, especially with a bit of clever variant pricing and Flow automation. But for truly iron-clad control, especially over guests or highly complex variable discounts, a well-chosen app can save you a lot of custom development time and headaches. It's all about balancing your specific needs with the tools available to you.


