Skip to main content
Liquid and Vite sections do not need JavaScript for shopping. Add data-jm-* attributes to your markup and the platform handles clicks, cart state and checkout. React sections can use the same attributes, or useCart() from @/platform.

Attributes

The cart’s open state is in cart.open and on html[data-jm-cart-open], so CSS can style the drawer.

Product card example

snippets/product-card.liquid

Cart drawer example

src/sections/cart-drawer/index.liquid
src/theme.css
Products on hold (on_hold) must not be buyable. Disable their buttons. The platform also refuses to add them to the cart.

JavaScript API

For custom behavior, window.JoinMarkt exposes: Events on document:
src/theme.ts