Services & products | CMS

Services & products

Bookable services, products and bundles (codes for sessions booked later), shown in Shop blocks.

{#if form?.message}{/if} {#snippet thumbnail(item: ItemRecord)} {#if item.imageUrl} {:else}
{/if} {/snippet} {#snippet typeBadge(item: ItemRecord)} {item.type === 'item_with_time' ? 'Service' : item.type === 'bundle' ? 'Bundle' : 'Product'} {/snippet} {#snippet price(item: ItemRecord)}{item.durations.length > 1 ? `from ${money.format(item.price)}` : money.format(item.price)}{/snippet} {#snippet details(item: ItemRecord)} {#if item.type === 'item_with_time'} {durationList(item)}{item.bufferMinutes ? ` + ${item.bufferMinutes} min get-ready` : ''}{(item.capacity ?? 1) > 1 ? ` · ${item.capacity} places` : ''} {:else if item.type === 'bundle'} {bundleList(item)} · {item.validMonths ? `valid ${item.validMonths} months` : 'no expiry'} {:else}—{/if} {/snippet} {#snippet status(item: ItemRecord, problem: string)} {#if problem} Not on sale {:else} {item.active ? 'Active' : 'Inactive'} {/if} {/snippet} {#snippet notes(problem: string, waiting: number)} {#if problem} {problem} {/if} {#if waiting} {waiting === 1 ? '1 code has' : `${waiting} codes have`} sessions of this left to book — they can’t while it’s inactive. {/if} {/snippet}
{#if draft.type === 'bundle'}
What’s in it
{#each draft.parts as row, i} {@const partItem = items.find((item) => item.id === row.item)}
× {#if partItem?.type === 'item_with_time'} {:else} {/if} {#if draft.parts.length > 1} {/if}
{/each}
The buyer gets a code; whoever has it books the services, each at the length set here, without paying again. Products are handed over with the purchase. A one-service voucher is a bundle with one part.
{:else if draft.type === 'item'}
{:else}
Lengths and prices
{#each draft.durations as row, i}
{#if Number(row.minutes) >= 5}{formatDuration(Number(row.minutes))}{/if} {#if draft.durations.length > 1} {/if}
{/each}
Customers pick a length with a slider in the shop; the price follows it.
{/if}
Image (draft = { ...draft, image: image.id ?? draft.image, imageUrl: image.url })}>

The shop uses the name as the image’s alt text.