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.
A button the theme disabled itself (a sold-out variant) is never enabled by the Element.
The events
All three areCustomEvents on window, with their data in detail.
filecheck:ready (Element to page)
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)
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 nofilecheck:readyis 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.