Mastering One-Time Purchases & Dynamic Discounts on Shopify: Community Insights
Hey fellow store owners! It’s your friendly Shopify expert here, fresh off diving deep into a really interesting discussion in the Shopify Community forums. A store owner, sed0481, brought up a couple of challenges that I know many of you face: how to limit a specific product to one purchase per customer, and how to create a discount that changes based on the product option selected. These are fantastic questions, and the community really dug into the nuances. Let’s break down what we learned and how you can tackle these for your own store.
Implementing a One-Time Purchase Limit Per Customer
First up, the 'one purchase per customer' rule. This is a common ask, especially for special promotions or exclusive items. sed0481 specifically wanted this to apply to both logged-in members and guest customers, which, as we’ll see, is where things get a bit tricky.
Using Native Shopify Discount Codes (with limitations)
The simplest native approach, as Mustafa_Ali pointed out, involves Shopify’s built-in discount codes. When you create a discount, you can check the 'Limit to one use per customer' box. This works by matching the customer’s email address. Here’s how you set it up:
- Go to 'Discounts' in your Shopify admin.
- Click 'Create discount' and choose 'Amount off products' or 'Percentage off products'.
- Set your discount value and apply it to your specific product.
- Under 'Maximum discount uses', tick 'Limit to one use per customer'.
This is great for logged-in customers. Shopify remembers their email, and they can’t use the code again. However, as Easify-Jennifer and Ellie-BOGOS highlighted, this isn’t foolproof for guest customers. A guest can simply use a different email address on their next purchase, and Shopify won’t recognize them as the same person. Ploqo explicitly stated, 'This counts logged in customers only. A guest can reuse it.' So, if you need strict 'one-time' enforcement for everyone, this method has its limits.
A Stricter Approach for Logged-In Customers (Shopify Flow + Liquid)
If requiring customer accounts is an option for you, Ploqo and devcoders offered a more robust native workaround using Shopify Flow and Liquid code. This method actually blocks the customer from adding the product to their cart again, rather than just preventing the discount. But remember, this still doesn't cover guests.
Here’s the general idea:
- Require Customer Accounts: Go to 'Settings' > 'Customer accounts' and set it to 'Accounts are required' or 'Accounts are optional' but encourage/require login for this specific product.
- Use Shopify Flow to Tag Customers:
- In Shopify Flow, create a new workflow.
- Set the trigger to 'Order created'.
- Add a condition: 'If the order contains this specific product'.
- Add an action: 'Add a customer tag', for example,
bought-special-product.
- Modify Your Theme with Liquid:
- This part requires a little comfort with code or help from a developer.
- You'd edit your product template (e.g., in the Rise theme, as Ploqo suggested) to check for this customer tag.
- If a logged-in customer has the
bought-special-producttag, you can use Liquid to hide the 'Add to Cart' button or display a message like 'You've already purchased this item.'
Ploqo gave a great example of this: 'In your Rise theme, add a little Liquid to the product template that hides the buy button when customer.tags contains ‘bought-x’.' Devcoders echoed this, suggesting using customer tags and custom logic for eligibility. This is powerful for registered users, but again, 'Guests still cannot be blocked.' This is the biggest hurdle for a truly universal 'one-time purchase' without a dedicated app.
Creating Variable Discounts Based on Product Options
Now, let’s tackle the second challenge: creating a discount where the amount changes based on the customer’s selected option (like A = ¥300 off, B = ¥500 off, C = ¥800 off, D = ¥1000 off). This is where Shopify’s native discount system, which typically applies a single flat amount or percentage, needs a bit of creative thinking.
The 'Percentage Trick' with Variants (Ploqo's Genius)
Ploqo shared a really clever native workaround if your desired discount amounts are proportional. The idea is to adjust your product variant prices so that a single percentage discount will yield the exact fixed amounts you want. For example, if you want ¥300, ¥500, ¥800, ¥1000 off, you could set the base variant prices to ¥3000, ¥5000, ¥8000, ¥10000 respectively, and then apply a 10% discount.
Here’s how to implement this:
- Turn Options into Variants: If your options A/B/C/D aren't already variants, make them so. Each option (A, B, C, D) becomes a distinct product variant.
- Price Variants Proportionally: Adjust the base price of each variant so that your chosen percentage discount (e.g., 10%) results in the desired fixed discount amount.
- Create One Discount Code:
- Go to 'Discounts' > 'Create discount' > 'Amount off products'.
- Set 'Discount value' to 'Percentage', and enter your chosen percentage (e.g., 10%).
- Under 'Applies to', select 'Specific products' and pick your product.
- Limit to One Use: Under 'Maximum discount uses', tick 'Limit to one use per customer'.
This is a clever way to get variable fixed discounts with a single code, but it hinges on those discount amounts being proportional. As Ploqo noted, 'If your four amounts are not proportional, so no single percentage can hit them, the only no app ways to vary a fixed amount by option are a custom Shopify Function (free, but it needs code) or splitting the options into separate products with one code each.'
Other Native Approaches & App Solutions
Mustafa_Ali suggested creating four separate fixed-amount discount codes (one for each variant A, B, C, D), each with its own amount and 'one use per customer' checked. This works, but it means more codes to manage and customers need to know which code to apply after selecting their option.
For more seamless variable discounts, especially if your amounts aren't proportional or you want more sophisticated option management, community members suggested apps like 'Easify Custom Product Options' (Easify-Jennifer) or a dedicated 'Product Discount' app (Ellie-BOGOS). These apps can often handle fixed amount discounts per variant directly, without needing to adjust base prices, and some even offer features like specific link addresses for discount visibility.
So, to answer sed0481’s core question: Can you achieve these things without a paid app? Yes, to a degree, but with significant caveats, especially concerning guest customers and the flexibility of variable discounts. The community discussion really highlighted that while Shopify offers powerful native tools, there are limits when you need strict, universal enforcement or highly dynamic pricing rules.
If your priority is a truly strict one-time purchase for all customers (members and guests), or if you need complex, non-proportional variable discounts by option, an app is likely your best bet for a smooth, reliable experience. They add a layer of functionality that goes beyond native capabilities. However, if you're comfortable with the limitations for guest customers or the variant pricing workaround, the native solutions can definitely get you part of the way there. It all comes down to your specific business needs and how much compromise you're willing to make on strictness versus cost. Leveraging the full power of the Shopify platform often means exploring both its robust native features and the incredible ecosystem of apps available. If you're just starting out or looking to expand your store's capabilities, remember that a strong e-commerce foundation is key. Building on a platform like Shopify gives you access to a world of solutions, whether native or through apps, to meet unique challenges like these.


