Checkpost

How to require a main product before an add-on can be purchased on Shopify

Short answer: Block checkout when an add-on (warranty, installation, engraving) is in the cart without the product it belongs to. In Checkpost, choose “Add-ons require a main product” from Templates, adjust the values, test it, then save and enable the rule.

The problem

Warranties, installation, engraving and refills only make sense with the main product. Orders for an add-on alone lead to refunds and confused customers.

How to set it up

  1. Install Checkpost from the Shopify App Store.
  2. Open Templates and choose Add-ons require a main product.
  3. Tag add-ons and main products.
  4. 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:

Shoppers see: “Add-ons can only be purchased together with a main product.” at the top of checkout, in the cart and at checkout.

Rule definition (JSON)
{
  "name": "Add-on without main product",
  "match": "all",
  "conditions": [
    {
      "kind": "cart_contains",
      "filter": {
        "productTags": [
          "add-on"
        ]
      }
    },
    {
      "kind": "cart_not_contains",
      "filter": {
        "productTags": [
          "main-product"
        ]
      }
    }
  ],
  "message": "Add-ons can only be purchased together with a main product.",
  "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

FAQ

Can one add-on work with several main products?

Yes. Give all compatible main products the same tag.

What if the main product was bought earlier?

Checkout rules see the current cart only. Sell standalone add-ons as a separate product without the add-on tag.

Related rules

Add add-ons require a main product to your store