Skip to content
On this page
How-to Block visibility 1 min read Updated Sep 28, 2026

Show a block only for specific products

In short

Open the block, turn on Enable conditional block visibility and add a Product in cart condition with your products. The block then shows only when at least one of them is in the cart.

✓ Applies to

  • Advanced and Deluxe plans
  • Any Checkout Ninja block, in any checkout position
  • Products, variants, product types and vendors

✕ Doesn't apply to

  • Hiding a single block type inside a block. Conditions apply to the whole block
  • Hiding payment methods or changing the cart. Use checkout rules for that
Want to add a product to the cart when a condition matches? Use a checkout rule →

Before you start

  • Create and save your block. How.

Steps

1

Turn on visibility rules

Open the block. In the Block Visibility card, turn on Enable conditional block visibility. Click Add new visibility condition.

2

Pick the products

Choose Product in cart. Under Product, select one or more products.

3

Save

Click Save.

Other product conditions

ConditionShows when
Product not in cartNone of them is in the cart
Variant in cart / not in cartA chosen variant is / isn’t in the cart
Product quantity in cartTotal quantity meets your number
Product type in cart / not in cartThat exact product type is / isn’t there
Vendor Name in cart / not in cartThat exact vendor is / isn’t there

All conditions.

i

Several conditions on one block work as OR. You can’t require two to match at once.

Check it works

  1. Checkout with a chosen product: the block shows.
  2. Swap it for another product: the block hides.

Good to know

  • Product type and vendor must match exactly, capitals included. One value per condition.
  • There’s no collection condition. Use products, a product type or a vendor.
  • Different content per product? Make one block per product.

Not working?

  • Shows for every cart: check visibility is on and saved, and no “not in cart” condition is matching.
  • Never shows: the Product field is empty, or type/vendor spelling is off.
  • Quantity doesn’t match: pick an operator (not ”-”) and a whole number.

Frequently asked

If I select several products, do they all have to be in the cart? +

No. Product in cart matches when any one of the selected products is in the cart. Product not in cart matches only when none of them are.

Can I show the block when product A is in the cart AND the buyer is in a certain country? +

Not with one block. When a block has several conditions, it shows as soon as any one of them matches. Conditions are combined with OR, not AND.

Can I show the block only when a buyer has 2 or more of a product? +

Yes. Use Product quantity in cart, select the product, choose Greater Than or Equal, and enter 2. Quantities are added up across all variants of all selected products.

Does Product type in cart ignore upper and lower case? +

No. Product type and vendor names must match exactly, including capital letters, as they're written in your Shopify admin.

Related guides

Still stuck? Open the app and use Support to chat with the team, or contact us. Don't have the app yet? Install Checkout Ninja.