Skip to main content
Some product pages offer two ways to buy: upload a finished file through Filecheck, or design one in a product customizer. Without coordination, each tool gates Add to cart on its own, so each blocks the shopper who chose the other. When the Element runs its own cart gate (the store plugins, or Filecheck.mount) and finds the page’s Add to cart button, it owns Add to cart for both. A customizer tells it when the shopper’s design is in, through three window events. Nothing else is shared: each tool keeps its own cart fields.
Print.App uses these events. Any other customizer can use them the same way.

Who owns the cart line

The last thing the shopper did owns the line:
  • Started an upload: the upload owns it. Add to cart waits for the file to pass, and a file that fails blocks until it is removed or replaced. Removing it hands the line back to a design that is still in.
  • Saved a design after that: the Element resets the upload, so its job leaves the cart form. The customizer’s message shows under the upload box.
  • Uploaded after a design: once the file passes, the Element tells the customizer (takeover), which removes its own design from the cart form.
What a page reload brings back (a remembered design, a resumed upload) is not a new action, so it never resets the other side. Before the shopper has done anything: A button the theme disabled itself (a sold-out variant) is never enabled by the Element.

The events

All three are CustomEvents on window, with their data in detail.

filecheck:ready (Element to page)

Sent once the Element holds an Add to cart button, and again when a customizer it has not heard from speaks up. When a customizer hears it, the Element owns Add to cart: stop hiding or disabling the button yourself. If the page has no button the Element recognises, it is never sent, and your own gate stays in charge.

filecheck:alternative (customizer to Element)

Send it once on start (the Element may already be on the page), whenever it changes, and in answer to every filecheck:ready: the store plugins mount a fresh Element after each add to cart, and it starts knowing nothing.

filecheck:status (Element to page)

Sent on every upload status change. owner is what the line carries now: 'upload', a customizer’s source, or null. takeover: true comes once, when an upload the shopper made after a design passes: remove your design from the cart form (your own fields only, without reloading the page), then send done: false.

Example

When it doesn’t apply

  • The Element mounted by your own code with Filecheck(...): there is no built-in cart gate, so no filecheck:ready is sent. Your page decides Add to cart.
  • A page builder or options app that owns Add to cart itself (Print.App’s Print Options, for example): it already combines both tools, and the Element’s own gate is not used.