Emergency

In urgent situations or outages, you can send a text message to our emergency line

Emergency line (text message only)

+45 29 70 15 95

Send a text message with the following information:

  • Your name and webshop
  • A description of the problem

Note: This service is only for critical situations where your webshop is down or has serious problems. For regular support, please use our normal support channels.

Maximum quantity per order: limit how many a customer can buy

How to set a purchase limit on a product, so customers can only buy a certain quantity per order. See what the customer sees, what counts toward the limit, and how to flag customers who buy again within 24 hours.

Reading time: about 20 minutes
Store owner

With the Maximum quantity per order field, you decide how many units of a product a customer can buy on a single order. If you set the limit to 2, a third unit can't be added to the cart, and the store checks it again all the way through checkout.

This is useful when a product should only be sold in limited quantities at a time. That could be over-the-counter medicine, a product you only have a few of, or a hot deal that should reach many customers rather than end up with a single bulk buyer. You need to decide for yourself which rules apply to your particular products.

How to set a maximum quantity per order

  1. Go to Products → All products, and open the product.
  2. Find the Stock management card.
  3. Enter the highest quantity in the Maximum quantity per order field, which is in the row below Pack size.
  4. Click Save and close, or Save and keep editing if you want to stay on the page.
The Stock management card on a product with the fields SKU, GTIN, MPN, and Pack size. The Maximum quantity per order field is highlighted and has the value 2. Below the field, it says Empty means no limit. Applies across variants, and next to it is the link select a label under Order labels. At the bottom are the Save and close and Save and keep editing buttons.
The Maximum quantity per order field is in the row below Pack size on the Stock management card. Here, the customer can buy no more than 2 units of the product per order.

The limit applies to the whole product, across variants. An empty field means no limit, so if you want to remove the limit again, clear the field and save. You can enter a whole number up to 65535. If you copy the product, the limit is copied too.

What the customer sees

In Shoporama's built-in themes, the customer can see the limit before anything goes into the cart. The screenshots here are from Montana:

  • On the product page, the text Max. 2 per order appears by the buy button, and the quantity field can't be set higher than the limit.
  • A small badge with the text Max. 2 appears on the product image, both on the product page and on the product cards in lists.
Product page in the Montana theme for Nordic Roast Ristretto coffee capsules. The Max. 2 badge is at the top of the product image, and the text Max. 2 per order is highlighted just above the quantity field and the Add to basket button.
On the product page, the limit appears just above the quantity field and the Add to cart button, and the badge is on the product image.

If the customer still tries to buy too many, a yellow message appears at the top of the page: You can buy no more than 2 of [product name] per order.

The Coffee capsules category page in the Montana theme. At the top of the page, a yellow box is highlighted with the message You can buy no more than 2 of Nordic Roast Ristretto coffee capsules, 30 pcs. per order. Further down, the product has the Max. 2 badge on its image.
The customer is sent back to the same page, and the message appears at the top. Here, the customer tried to add the product to the cart from a category page.

If you use a different theme, it looks different. You can read about this in the Themes section further down.

How the limit is enforced

It's the store itself that enforces the limit, not just the customer's browser. So the customer can't get around it by changing the number in the quantity field or by using a direct link. The limit is checked in these places:

When the customer adds the product to the cart

If the cart goes over the limit, the entire addition is rejected. A lower quantity is not added to the cart instead. If the limit is 2 and there is already 1 in the cart, an attempt to add 2 more is rejected, and there is still only 1 in the cart. The customer is sent back to the page with the message. If the customer adds several different products to the cart at once, only the product that is over the limit is rejected. The others are added.

When the customer changes the quantity in the cart

If the customer enters a quantity in the cart that's too high, it's reduced to the allowed quantity, and the message is shown. If the customer removes one variant and moves the quantity to another variant in the same update, that's fine, as long as the total quantity stays within the limit.

When the cart is already over the limit

This can happen when the customer arrives via a link from a cart email or a shared cart, or when you have lowered the limit after the product was added to the cart. The store then automatically corrects the cart on the cart page, starting from the last line and working up, and shows the message.

At checkout

The address, shipping, payment, and confirmation steps all reject a cart that's over the limit and send the customer back to the cart. After payment, nothing is ever rejected. A paid order is always created.

What counts toward the limit

  • All variants of the product are counted together. If the limit is 2, the customer can buy 1 in black and 1 in white, but not 2 of each.
  • Subscriptions count at the time of purchase. Later renewals of the subscription are neither stopped nor flagged.
  • The contents of a bundle count. A bundle with 2 units of the product counts as 2.
  • The limit follows whole packs. If the limit is 5 and the pack size is 2, the customer can buy no more than 4.

Where the limit doesn't apply

  • Manual orders. Orders you create yourself in the admin are not covered.
  • Sales in POS. What you ring up yourself at the register isn't stopped by the limit. However, if you link the sale to a customer or an email address, it can count toward the flagging of purchases over the limit, and the order itself can get the label.
  • Your own system. Orders that your own system creates via the REST API aren't stopped by the limit. However, if the system uses the same order flow as the checkout, the orders can count toward the flagging.
  • Upselling after purchase. Products with a limit aren't suggested and can't be bought there.

On the other hand, the limit also applies outside the regular store: in the self-service POS, where customers check themselves out, in a storefront built on the Headless API, and when an AI agent shops via UCP. For developers: the Headless API and UCP respond with the error code max_per_order when the limit is reached.

When the customer places a new order

The limit applies per order, so the customer can place a new order right after the first one. The store doesn't stop that. You can, however, have such orders flagged with an order label, so you can decide what to do with them.

How to turn on flagging

  1. Go to Orders → Order labels.
  2. Click Create new label, or click a label you already have.
  3. Give the label a name, such as "Over daily limit", and choose a color.
  4. Check Use this label for purchases over the limit.
  5. Click Save and close.
The Edit label page for the label Over daily limit with the Name and Color code fields. The Use this label for purchases over the limit checkbox is checked and highlighted. At the bottom are the Save and close, Save and keep editing, and Delete buttons.
Check the box on the label that should flag the orders. You choose the name and color yourself.

The label isn't created automatically. Without a label with that box checked, no orders are flagged. Only one label in your store can have this function, and if you check the box on another label, the function moves to that label. The label can't also be used for withdrawals or exchanges.

When an order is flagged

Shoporama adds up the purchases of the same product by the same customer within 24 hours before or after the time of the order. If the total quantity exceeds the product's Maximum quantity per order, the order that goes over the limit gets the label. The first order doesn't. This is checked when the order is created and again when it's paid.

An example: the limit is 2. The customer buys 2 units in the morning and 1 unit in the afternoon. The afternoon order gets the label, because the customer has now bought 3 units within 24 hours.

The order also gets a note, which you find behind the Internal note (technical log) button in the Comments card on the order. It reads like this: "Purchase over the limit: 3 pcs. of [product name] within 24 hours. The limit is 2. Previous order: 1234"

In the order list, the label appears as a badge next to the order's status. You can filter by it with the Label button and remove it from an order with the cross.

The Your orders list, filtered with the Label button. Order 2083 has the status New, and the Over daily limit badge with a small cross is highlighted next to the status.
The label appears next to the order's status. Filter with the Label button to see only the flagged orders, and remove the label from an order with the cross.

Which orders count

Only paid orders count, and the label is only added once the order has been paid. These orders don't count:

  • Cancelled and credited orders
  • Credit notes
  • Exchange orders
  • Manual orders
  • Unpaid orders
  • Purchases as a subscription

Things to be aware of

  • The customer is only recognized by exact details. Purchases are linked when the email address, phone number, or customer account is exactly the same. If the customer uses a different email address and a different phone number and not the same customer account, the purchases aren't linked.
  • Phone numbers are compared exactly as they are written. To Shoporama, +45 12 34 56 78 and 12345678 are two different numbers.
  • The order goes through. The label doesn't stop the purchase. If you don't want to ship the product, you need to cancel and refund the order yourself.

Themes

The limit itself works in all themes, because it's the store that enforces it. The difference is what the customer sees.

  • Montana, MontanaB2B, Delaware, and DelawareDK show the message, the text by the buy button, a badge on the product, and a quantity field that stops at the limit.
  • California shows the message, the text by the buy button, and a badge on the product card. The quantity field in the cart stops at the limit.
  • Alaska shows the message and a text by the buy button and on the product card. The quantity field stops at the limit.
  • Washington shows the message as a short error message, the text by the buy button and on the product card, and the plus button in the cart stops at the limit. The message can't be changed under Design → Texts.
  • Your own themes and customized copies reject the customer, but without an explanation, until the theme has been updated. So the customer finds that the product doesn't go into the cart, without being told why.

If you have your own theme or a customized copy of a built-in theme, your developer needs to add the message. How to do this is described in the developer documentation. If you don't have a developer, one of our design partners can help. Until then, you can write the limit in the product description, so the customer knows about it in advance.

Set the limit on many products

If you need to set the limit on many products, you don't have to open them one at a time.

Bulk editing

Select the products in the product overview, click Table editing in the bar at the bottom, and choose the Max. per order column in the Select fields window. The limit belongs to the product and not to the individual variant, so variant rows just show an asterisk (*). Read more in the article on mass editing products.

Import and export

Under Products → Import/export, you can import the limit from a CSV file. Choose Maximum quantity per order in the Import into column next to the field in the file that holds the limit. Empty or 0 means no limit. When you export your products, the column is called max_per_order. Read more in the article on how to import products from a CSV file.

API and Claude (for developers and AI users)

The field is called max_per_order in the REST API and in the product_create and product_update tools when you control your store with Claude. If you send null or 0, the limit is removed. The REST API rejects an invalid value, such as text or a number above 65535, with error code 400.

Frequently asked questions

What's the difference between Maximum quantity per order and Quantity on sale?

Quantity on sale controls how many units are sold at the sale price. When the number reaches zero, the sale ends, and the product can still be bought at the regular price. It doesn't limit how many the customer can buy. Maximum quantity per order limits the purchase itself, regardless of the price. The two fields are independent of each other.

I sell two brands with the same active ingredient. Do they count together?

No. The limit is set on the individual product, so two different products count separately, even if the contents are the same. If the limit is 2 on both, the customer can buy 2 of each on the same order. There's no shared limit across products.

Can't the customer just place a new order and buy more that way?

Yes. The limit applies per order, so you can't prevent that. You can have the order flagged, so you notice it and can cancel it yourself if you want to. How to do this is described in the section When the customer places a new order.

A customer calls and wants to buy more than the limit allows. Can I sell them the products myself in the admin?

Yes. The limit doesn't apply to orders you create with the Create order button in the order list, and those orders aren't counted in the flagging either. You need to decide for yourself whether the sale is appropriate.

An order has been given the label. What do I do now?

Open the order, and read the note. It tells you how many units the customer has bought and which earlier order it concerns. Then you decide whether to cancel the order or whether it can be shipped. If you choose to ship it, you can remove the label, so you don't look at the order again.

Am I notified when an order is flagged?

No, no email is sent. Filter the order list by the label, and bookmark the page. That gives you one place to check, for example every morning before you pack orders.

Can I change the 24 hours or set a separate daily limit?

No. The 24 hours are fixed, and the flagging uses the same number as the Maximum quantity per order field. There's no separate limit per day or per customer.

Can my business customers be allowed to buy more than others?

Not in the store. The limit applies to all customers, regardless of customer group. If a business customer needs more, you can create the order manually in the admin.

Can I get a list of the flagged orders for my own records?

Yes. Filter the order list by the label, and check at least one order. Click Export in the Bulk editing bar at the bottom of the page, and choose CSV file (all search results). Read more in the article Export orders as a CSV file.

Can I change the wording of the message and the text by the buy button?

Yes. Go to Design → Texts, and search for the Danish original wording "højst købe" or "Maks.". Keep {max} and {name} where they appear in the text. They're replaced with the number and the product's name. The texts only appear in the list once they have been shown in the store. If you can't find them, try adding too many to the cart yourself. Read more in the article on how to customize and translate texts.

Need help? Contact us at support@shoporama.dk.