How to Limit Customers to One Item and One Quantity Per Checkout on Shopify

If you want to ensure that your customers can only purchase one item and one quantity per checkout on Shopify, you’ll need to apply certain restrictions. This can be useful for limited-edition products, special promotions, or preventing bulk buying. Below, we’ll explore different ways to set up this limitation on your Shopify store.

Why Restrict Checkout to One Item and One Quantity?


  • Avoid bulk purchases: Prevent customers from buying large quantities and reselling.

  • Fair distribution: Ensure all customers have a chance to purchase exclusive items.

  • Control inventory: Helps manage stock effectively.

  • Enforce promotional rules: Useful for limited-time deals or giveaways.

Methods to Restrict Checkout

There are multiple ways to enforce this restriction, including using Shopify’s settings, apps, and custom code. Let’s go through each method in detail.

1. Using Shopify’s Built-in Features (Basic Option)

Shopify does not have a direct feature to restrict checkout to one item and one quantity, but you can set purchase limits using the following workaround:

Steps:

  1. Go to Your Shopify Admin Panel

  2. Navigate to Products > Select the Product

  3. Scroll to Inventory Section

  4. Set Purchase Limit Using Variants:

    • If you use multiple variants, create a single variant with a max inventory of 1 per order.


  5. Disable Multiple Quantities:

    • This doesn’t enforce quantity restrictions at checkout but can be helpful as a preliminary step.

However, this method does not completely prevent customers from adjusting quantities in the cart. To enforce strict limits, you’ll need a more advanced approach.

2. Using Shopify Apps (Easiest Method)

Several Shopify apps allow you to enforce one product, one quantity per checkout easily. Here are a few recommended options:


  • Order Limits - MinMaxify: Lets you set min/max quantity restrictions.

  • Advanced Product Rules: Restricts cart rules for specific products.

  • Order Limits by Shopify: A free app that provides simple restrictions.

Steps to Use an App:


  1. Go to Shopify App Store

  2. Search for “Order Limits” or “Min/Max Quantity”

  3. Install and Configure the App

  4. Set a Maximum of 1 Item and 1 Quantity

  5. Test Checkout to Ensure It Works

3. Custom Code (For Developers)

If you have experience with Liquid (Shopify’s coding language) or JavaScript, you can manually limit checkout behavior.

Add Code to Your Theme:


  1. Go to Online Store > Themes

  2. Click “Edit Code”

  3. Locate cart.liquid File

  4. Insert the Following Code:

{% if cart.item_count > 1 %}

   <script>

      alert("You can only purchase one item per order!");

      window.location.href = "/cart";

   </script>

{% endif %}


  1. Save and Test Checkout

This script checks if the cart contains more than one item and redirects the user back to the cart page.

4. Using Shopify Plus Scripts (For Shopify Plus Users)

If you're using Shopify Plus, you have access to Shopify Scripts, which allows for more advanced checkout customization.

Steps:

  1. Go to Shopify Scripts Editor

  2. Select Cart and Checkout Scripts

  3. Use a Script Like This:

Output.cart.line_items.each do |line_item|

   if Output.cart.line_items.count > 1 || line_item.quantity > 1

      line_item.errors.add('You can only purchase one item and one quantity per checkout.')

   end

end


  1. Save and Publish the Script

Testing Your Restrictions

Once you apply any of the methods above, you must test your checkout process:


  • Try adding more than one item.

  • Attempt to increase the quantity.

  • Complete a test checkout to ensure restrictions work correctly.

Conclusion

Limiting customers to one item and one quantity per checkout can help maintain stock control, prevent bulk buying, and enforce fair purchasing rules. Whether you use Shopify’s built-in settings, apps, custom code, or Shopify Plus Scripts, you can find a solution that fits your store’s needs. Choose the best method based on your technical skills and business requirements!

At Windborne Solutions, we’ve helped many Shopify stores optimize their checkout process to fit their unique needs. Whether you need custom Shopify setup, checkout flow optimization, or better store functionality, we can help make it seamless. Check out our work here.