How to prevent sample-only orders on Shopify
Short answer: Block checkout when sample-tagged products are present without a product tagged sample-qualifier, so samples accompany a qualifying full-size purchase. In Checkpost, choose “Samples need a qualifying full-size product” from Templates, adjust the values, test it, then save and enable the rule.
The problem
A quantity cap still permits orders containing only free samples. This separate rule requires a qualifying full-size product, keeping sample allowances tied to a product purchase rather than any item in the cart.
Related merchant discussion on Shopify Community
How to set it up
- Install Checkpost from the Shopify App Store.
- Open Templates and choose Samples need a qualifying full-size product.
- Tag samples and qualifying full-size products separately. Combine with the sample quantity cap if both policies apply.
- Use Try this rule to test a sample cart, then click Save rule.
The rule
Checkout is blocked when all of these conditions are true:
- Cart contains products tagged sample
- Cart does not contain products tagged sample-qualifier
Shoppers see: “Add a qualifying full-size product to order samples, or remove the samples.” at the top of checkout, in the cart and at checkout.
Rule definition (JSON)
{
"name": "Samples with qualifying products only",
"match": "all",
"conditions": [
{
"kind": "cart_contains",
"filter": {
"productTags": [
"sample"
]
}
},
{
"kind": "cart_not_contains",
"filter": {
"productTags": [
"sample-qualifier"
]
}
}
],
"message": "Add a qualifying full-size product to order samples, or remove the samples.",
"target": "cart",
"runOn": "always"
}Examples with the default settings
These outcomes apply to this rule alone. Other enabled rules may also affect checkout.
| Test cart | Expected outcome |
|---|---|
| 1 sample plus a tagged full-size product | Allowed by this rule |
| 1 sample plus an untagged accessory | Checkout blocked |
Where this rule works
These are cart and checkout validations, including supported accelerated checkouts. They are current-cart policies; they do not track previous purchases of a SKU. Shopify excludes POS, recurring subscription orders and native pre-order/Try Before You Buy flows from this API. See Shopify's validation compatibility.
Tips
- Use sample for samples and sample-qualifier for eligible full-size products. Do not put both tags on a sample.
- Untagged accessories or gift cards do not qualify by default.
- A tag identifies eligibility, not payment value. If a qualifying item can be fully discounted, this rule still accepts it; add a separate minimum-subtotal policy when needed.
FAQ
Does any non-sample product qualify?
No. The product must carry sample-qualifier, so you control whether small accessories or gift cards count.
Does this also restrict the number of samples?
No. Add the Maximum 3 samples per order preset to enforce both policies.
Related rules
Don't mix pre-orders with in-stock items
Require pre-order items to be checked out separately so in-stock items aren't held back waiting for pre-order stock.
Add-ons require a main product
Block checkout when an add-on (warranty, installation, engraving) is in the cart without the product it belongs to.
Add samples need a qualifying full-size product to your store