# Order ahead

Chapter 8 of the Sprinkle user guide.

Order ahead asks every shopper when they want their order, in the bag, before checkout. You set your lead times, closing days and time slots once, and the theme works out what can be chosen.

> **Shopify checkout doesn't enforce the date.** It travels with the order as a note, so a shopper could reach checkout without one if they use a saved link, and your shipping or pickup settings at checkout are separate. Always check the date on the order.

In practice that means three things. The date is a request from the shopper, saved on the order, and Sprinkle's rules are checked in the bag rather than by Shopify. Shopify's own checkout will still ask "Ship or pick up?", and it doesn't know what the shopper said in the bag. And the theme doesn't count orders, so it won't stop at ten cakes on a Saturday. The rest of this chapter shows how to set things up so those gaps rarely matter.

## What shoppers see

| Where | What it says |
| --- | --- |
| **Header** | A pill, "Next pickup Fri 6 Nov" (chapter 3). In the menu drawer on phones. |
| **Hero** | "**Next pickup Fri 6 Nov.** Order by 2 pm today." (chapter 4) |
| **Product cards** | "Order 2 days ahead", or "No need to order ahead" for a lead time of 0 |
| **Product page** | The Lead time note: "**Order 3 days ahead.** Earliest pickup Sat 7 Nov." |
| **The bag** (drawer and cart page) | A panel above the subtotal, with the heading **When should we have it ready?**, a Pickup and Delivery choice, a month calendar, a time slot menu, and one line explaining the first date: "Your cake needs 3 days, so the first date is Sat 7 Nov." |

The calendar starts on Monday. Days that can't be chosen are struck through, and screen readers hear why: Closed, Too soon, Too far ahead or Past. It works with the keyboard: arrow keys move a day, Home and End the week, Page Up and Page Down the month.

Every date is live. The theme prints an estimate, and the browser corrects it as the page opens, using your Store time zone. So the "today" that counts is yours, whichever time zone the shopper is in.

When a date is chosen it's saved at once, and the panel says so: "Saved. Pickup Sat 7 Nov, 9 am to 11 am."

## How the first date is worked out

The first date a shopper can pick comes from these steps, in order:

1. **Today**, in your Store time zone.
2. **Plus one day**, if your Daily order cutoff has passed.
3. **Plus the lead time**: the largest lead time of anything in the bag. Each line uses its product's `custom.lead_days`, or **Default lead time** if it has none.
4. **Plus Extra days for delivery**, when Delivery is chosen.
5. **Forward to the next open day**, if that lands on a closed day.

The last date is today plus **Furthest date shoppers can pick**.

An example, with a cutoff of 2 pm and Monday and Tuesday closed. A shopper with cookies (1 day) and a cake (3 days) in the bag opens it at 3 pm on Thursday 5 November. The cutoff has passed, so the count starts on Friday 6. The largest lead time is 3, which gives Monday 9. Monday and Tuesday are closed, so the first date is **Wednesday 11 November**, and the panel says "Your cake needs 3 days, so the first date is Wed 11 Nov."

Three things to know:

* **Default lead time is a fallback, not a minimum.** A product with `custom.lead_days` of 1 counts as 1, even if the default is 2.
* **Lead time is in calendar days.** Closed days aren't added to it: they only move the date forward onto an open day. If you need three baking days and you're closed on Monday and Tuesday, allow for that in your lead time.
* **Add-ons don't count.** A cake's add-on products (chapter 9) ride along with the cake and set no lead time of their own. If fresh flowers need more notice, set it on the cake.

The pill and the hero line use your Default lead time on an empty bag, and the bag's lead time once there's something in it.

If a shopper changes something that makes their date impossible (they add a slower item, the cutoff passes while the bag is open, or they switch to Delivery), the theme never moves the date quietly. It clears it and says why: "Your cake needs 3 days, so we've cleared Fri 6 Nov. Please pick a new date."

## Setting it up

All of this is in **Theme settings › Order ahead** (the full table is in chapter 2).

**Your time zone.** **Store time zone** decides what "today" and the cutoff mean, and it's separate from the time zone in your Shopify settings, so set it even if that one is right. The presets use their demo bakeries' zones. If your city isn't in the list, type its name in **Other time zone** in the form `Asia/Singapore`, as listed in the IANA time zone database. If the theme can't read it, it uses the list, and the theme editor says so in the bag.

**Your closed days.** **Closed days and dates** takes one entry per line, in any of three forms:

```
Monday
Tuesday
2026-12-25
2026-12-24 to 2027-01-04
```

Weekday names can be full or three letters (Mon), with or without capitals. Dates are year-month-day. Anything else is ignored, and in the theme editor a line under the panel lists what wasn't understood. You can open the bag in the editor at any time to check: the panel shows there even on an empty bag.

Use this for holidays and for days you're full. **The theme doesn't limit orders per day or per slot**, so when a Saturday fills up, add its date here. Every date that's closed this way disappears for new shoppers at once. A shopper already holding that date in their bag has it cleared, with a message.

**Lead times.** Set **Default lead time** to what most of your range needs, and `custom.lead_days` on the products that differ (chapter 7).

**The cutoff.** **Daily order cutoff** is the hour after which an order counts from tomorrow. Choose **No cutoff** if it makes no difference to you. It also adds "Order by 2 pm today." to the hero line.

**Time slots.** **Pickup time slots** and **Delivery time slots** each take one slot per line, in your own words: "9 am to 11 am", "Morning", "After school". Leave a list blank for no time slot, and the slot menu disappears for that method. Slots are the same on every day. They're labels only: the theme doesn't check them against the calendar or against your opening hours.

**Pickup, delivery or both.** With both **Offer pickup** and **Offer delivery** on, the panel shows a choice, starting on Pickup. With one on, the choice hides. With both off, order ahead is off. If you only offer delivery, the pill and hero read "Next delivery" and the note reads "Earliest delivery".

**Extra days for delivery** adds days to the first date when Delivery is chosen, for a van run or the post. A shopper who switches to Delivery sees the calendar change.

**Require a date before checkout** (on) keeps the **Check out** button off until there's a date, and a slot when that method has slots. "Choose a date to check out." sits right above the button. Off, the shopper can check out without choosing, and you'll get orders with no date.

**Hide Buy it now and express buttons** (on) hides Buy it now on product pages and the express buttons (Shop Pay, Apple Pay and the rest) in the bag, because they skip the bag and so skip the date. With pickup and delivery both off there's no date to skip, so they come back. Leave it on unless you've thought it through. The shopper can still pay with those methods at checkout.

**Next pickup link** sends the pill somewhere other than the bag. The `page.how-ordering-works` template is made for it: create a page, assign the template, and paste its address here.

## Set up Shopify's pickup and delivery to match

The bag decides the date. **Shopify's checkout decides how the order gets to the shopper and what that costs**, from the settings in **Settings › Shipping and delivery**. The two don't share anything, so set both to say the same thing.

**Local pickup** (Shopify calls it Pickup in store):

1. In admin, go to **Settings › Shipping and delivery**.
2. Under **Additional delivery methods**, click **Pickup in store**.
3. Click your location, and in **Location status** turn on **Let customers pick up orders directly at this location**.
4. In **Expected pickup date**, choose a processing time. Customers see this at checkout, and it can't know about lead times, so choose the longest option that suits your usual order.
5. In **Ready for pickup notification**, write your instructions, such as "Come to the side door any time in the slot you chose. Please bring your order number."
6. **Save**. Repeat for each location.

At checkout, shoppers then see **Ship** and **Pick up** in the Delivery section. When an order is ready, click **Mark as ready for pickup** on the order in admin and Shopify sends that notification.

**Local delivery**:

1. In **Settings › Shipping and delivery**, under **Additional delivery methods**, click **Local delivery**.
2. Click your location, and in **Location status** turn on **Deliver orders to customers directly from this location**.
3. In **Delivery zones**, choose **Use postal codes** or **Set a delivery radius**, then click **Add zone**.
4. Fill in the zone: its **Zone name**, the postcodes or the **Delivery radius up to**, an optional **Minimum order price**, the **Delivery price** (0 for free) and optional **Delivery information**, which also appears in order confirmation emails. You can have up to 10 zones per location.
5. **Save** the zone, then **Save** the location.

At checkout, eligible shoppers then see **Local delivery** as a shipping option. They must enter a phone number, and their address must match a suggested address.

**Match the theme to Shopify:**

| You offer | Theme settings | Shopify |
| --- | --- | --- |
| Pickup only | **Offer pickup** on, **Offer delivery** off | **Pickup in store** on for your kitchen. Local delivery off. If you never ship, remove your shipping rates, so that Pick up is the only option. |
| Local delivery only | **Offer pickup** off, **Offer delivery** on | **Local delivery** on, with your zones. Pickup in store off. |
| Both | Both on | Both on. Use **Extra days for delivery** if delivery needs longer. |
| Posted goods as well, such as macarons | **Offer delivery** on, with **Delivery time slots** blank and **Extra days for delivery** for the post | Shipping rates in your shipping profiles |

**What still can't line up, and what to do about it:**

* **The shopper chooses twice.** A shopper who chose Pickup in the bag can choose Ship at checkout. So read both on the order: the `Fulfilment` attribute and the delivery method. If they differ, message the shopper.
* **The delivery area is only checked at checkout.** The bag offers Delivery to anyone. Someone outside your zones only finds out at checkout, where Local delivery doesn't appear. Say where you deliver in your announcement bar, your FAQ or the `page.how-ordering-works` page.
* **Shopify's pickup time isn't the shopper's date.** Checkout's "Usually ready in 24 hours" is Shopify's general text. The date on the order is the one that counts.
* **The Pickup availability block** on the product page shows the same Shopify data, and nothing from order ahead. Chapter 6 compares the two, and many bakers remove that block.

## Read the date on an order

The date is saved as three **cart attributes**, which become the order's additional details:

| Attribute | Value | Example |
| --- | --- | --- |
| `Pickup date` | The date, in this exact format. The name stays the same for delivery, so you have one field to read. | Sat 7 Nov 2026 |
| `Time slot` | The slot's text | 9 am to 11 am |
| `Fulfilment` | `Pickup` or `Delivery` | Pickup |

In admin, open the order and look under **Additional details**. To plan a week's baking, export your orders (**Orders › Export**): the attributes are in the CSV's **Note Attributes** column. Sort it in a spreadsheet by date.

To show the date in your order confirmation email, go to **Settings › Notifications**, open **Order confirmation**, click **Edit code**, and paste this where you want it, for example under the order number:

```liquid
{% if attributes['Pickup date'] != blank %}
  <p>{{ attributes['Fulfilment'] }}: {{ attributes['Pickup date'] }}{% if attributes['Time slot'] != blank %}, {{ attributes['Time slot'] }}{% endif %}</p>
{% endif %}
```

Then send yourself a test order. The theme gives shoppers no way to change a date after checkout, so tell them how to ask: the `page.how-ordering-works` template's sample questions have a place for it.

## Empty and off states

| What | What happens |
| --- | --- |
| Empty bag | No panel. The pill and hero line still show, using your Default lead time. |
| **Turn on order ahead** off, or pickup and delivery both off | Everything disappears: the panel, the pill, the hero line, the Lead time note, card lead lines and the checkout gate. Compare drops its Lead time row. Buy it now and express buttons come back too. |
| No slots for the chosen method | No slot menu, and no slot is required |
| No open date up to the furthest date | "No dates available right now. Please contact us." The pill and the hero line hide, and checkout stays off while a date is required. A lead time longer than **Furthest date shoppers can pick** does the same. |
| JavaScript off | On the cart page, the browser's own date field replaces the calendar. The drawer needs JavaScript to open at all. |
