Admin location page¶
Settings › Selling › Locations › a location edits one place the shop keeps stock, sells, sends or hands over orders, cooks or seats diners. Every kind of location shares one form, so before this design a restaurant saw courier collection, safety stock, sending preference, a fulfiller picker, daily capacity and collection slots beside its ordering settings, with three sets of hours and two preparation times. This page records how the form decides what to show. How locations work is in Locations; the shop owner's guide is Locations.
Decisions¶
- The ticks decide the page. "What happens here" is the one place that says what a location does, and each card or field shows only when a box it needs is ticked. A restaurant sees hours, collection instructions, restaurant ordering and its dining room; a warehouse sees sending and stock; a shop with tills sees point of sale and collection.
- Hide, not grey out. Greyed-out cards keep the page as long as it was, which was the complaint. Hidden cards are listed at the bottom ("Not used here") with the box that shows each, and every box says what it adds, so nothing is hard to find.
- Live, and nothing lost. Ticking a box shows its cards straight away (a short inline script, no Bootstrap JS). Hidden cards stay in the form and post their saved values, so unticking a box and saving never clears what it held.
- "Takes food orders" is a tick like the others. It moved from inside the Restaurant ordering
card to "What happens here", so the card is gated like every other. It shows only when the shop
has restaurant ordering on, or the location already takes food orders. It isn't a
LocationCapability: it is stillordering.enabled. - One Hours card. Opening hours, then (for a kitchen) "Food orders taken": During opening hours or At different times, which shows the split lunch and dinner table. Choosing During opening hours saves no ordering hours, whatever the hidden table held, so the two can't drift. Table bookings stay with the dining room's services and the Hours card says so; they are a different thing (when a table can be booked), not a third set of opening hours.
- One preparation time per kind of order. Food orders use the Restaurant ordering card's preparation time and nothing else. The Collection card's "Time to get an order ready" is for click and collect orders of products, sits under "Click and collect orders", and shows only for a location ticked Customers collect orders here or Kerbside. The collection instructions are shared by both and show for any location customers collect from.
- Related fields sit together. Courier collection, pick and pack time and sending preference are one card, "Sending web orders". "Stock and fulfilment" keeps who packs orders and the safety stock.
- Demo data matches. The Clatter demo's restaurants no longer tick Customers collect orders here: food collection doesn't need it, and with it ticked the page would show the click and collect timings beside the kitchen's.
What each section needs¶
LocationFormSections (web-admin) holds the rules: each section lists the tokens any one of which
shows it, and optionally tokens it also needs. Tokens are LocationCapability names, FOOD
("Takes food orders") and ALWAYS. The template writes them into data-needs / data-needs-all
for the script and calls show(...) for the first render, so the rules live in one place.
| Section | Needs any of | Also shown when |
|---|---|---|
| Status, About, What happens here, Address, Hours, Holiday hours | (always) | |
| Store page | Show on store pages, Collect, Kerbside | it has a store page today (the main location collected from) |
| Collection: instructions | Collect, Kerbside, Takes food orders | the main location is collected from |
| Collection: kept for | Collect, Kerbside | the main location is collected from |
| Collection: time to get an order ready | Collect, Kerbside | |
| Food orders taken, Restaurant ordering | Takes food orders | |
| Dining room | Seats diners | it has a dining room |
| Sending web orders | Ships web orders | |
| Stock and fulfilment: who packs | Ships, Collect, Kerbside | |
| Stock and fulfilment: held back from online sale | Holds stock, with several stock locations | |
| Capacity, slots | Ships, Collect, Kerbside | it has store delivery slots |
| Capacity and slot rows | their own kind of work (click and collect; ship from store; store delivery) | store delivery slots exist |
| Point of sale | Sells in person |
A later change that adds a card to the location form gives it a section in LocationFormSections
(and a "Not used here" line), rather than showing it to every location.
Mock-ups¶
- Location page redesign (October 2026): the form for a restaurant, a warehouse and a shop with tills, with live ticks. Private until shared.