How to prevent mixing pre-order and in-stock items in a Shopify cart
Short answer: Require pre-order items to be checked out separately so in-stock items aren't held back waiting for pre-order stock. In Checkpost, choose “Don't mix pre-orders with in-stock items” from Templates, adjust the values, test it, then save and enable the rule.
The problem
When a cart mixes pre-order and in-stock items, you either hold the in-stock items until the pre-order arrives or split shipments at your own cost.
How to set it up
- Install Checkpost from the Shopify App Store.
- Open Templates and choose Don't mix pre-orders with in-stock items.
- Tag pre-order products with "preorder".
- 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 preorder
- Cart contains items other than products tagged preorder
Shoppers see: “Pre-order items must be purchased separately from in-stock items.” at the top of checkout, in the cart and at checkout.
Rule definition (JSON)
{
"name": "Pre-orders checked out separately",
"match": "all",
"conditions": [
{
"kind": "cart_contains",
"filter": {
"productTags": [
"preorder"
]
}
},
{
"kind": "cart_contains_other_than",
"filter": {
"productTags": [
"preorder"
]
}
}
],
"message": "Pre-order items must be purchased separately from in-stock items.",
"target": "cart",
"runOn": "always"
}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
- Tag pre-order products (preorder) and remove the tag when stock arrives.
- Explain in the message that in-stock items can be bought in a separate order.
FAQ
Can a cart contain several pre-order items?
Yes. Only mixing pre-order with non-pre-order items is blocked.
Does it work with pre-order apps?
Yes, as long as pre-order products carry a tag your rule can check.
Related rules
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.
Samples need a qualifying full-size product
Block checkout when sample-tagged products are present without a product tagged sample-qualifier, so samples accompany a qualifying full-size purchase.