Party in a box
Chapter 11 of the Hooray user guide.
Party in a box turns a guest count into a shopping list. The shopper sets how many are coming and picks a party theme, and the section lists the per-guest things in that theme (plates, cups, napkins, favour bags) with the number of packs each needs, rounded up to whole packs. They untick anything they already have, adjust a line if they like, and add the whole box to the cart in one tap. In the cart, the box's lines stay together as one card.
What shoppers see
- Guests: a stepper from Fewest guests to Most guests, starting at Guests to start with. Shoppers can also type a number.
- Party theme: a dropdown of your party themes, one per collection.
- The list, headed "Your box: Rainbow party · 24 guests", one line per product: a tick box, the photo, the name, a packs stepper, the maths ("24 guests ÷ 12 a pack = 2 packs", or "24 guests ÷ 20 a pack = 1.2, rounded up to 2 packs") and the line price. An unticked line says "Not added". A sold-out product is listed, unticked, and can't be ticked.
- A line the shopper changes with its own stepper stops following the guest count and says "You set this · Match guests"; Match guests puts it back.
- The total: "Box total for 24 guests" and how many items are ticked ("3 of 4 items"), then Add party box.
Pressing Add party box adds every ticked line in one go, opens the cart drawer, pops confetti from the button (Theme settings › Motion and effects) and says "Party box added: 4 items for 24 guests." If one of the lines can't be added (say it sold out a moment ago), nothing is added and the reason shows under the button, so a box never arrives half-made.
The maths
For every ticked line that the shopper hasn't set by hand:
packs = guests ÷ pack size, rounded up
So 24 guests with plates in packs of 12 is 2 packs, with napkins in packs of 20 is 2 packs (1.2 rounded up), and with favour bags in packs of 8 is 3 packs. The pack size is the product's custom.pack_size metafield (chapter 7). Changing the guest count updates every line the shopper hasn't set by hand. Changing the theme starts that theme's list afresh, with every available line ticked.
Set it up
- Give your per-guest products a pack size: create the
custom.pack_sizedefinition (an Integer, 1 or more) and fill it in: 12 for a 12 pack of plates, 20 for napkins in twenties, 8 for favour bags (chapter 7). - Make a collection for each party theme, such as "Rainbow party", "Gold and white" or "Dinosaur dig", in Products › Collections, holding that theme's per-guest products. The collection's title is the theme's name in the dropdown and on the order, so title it the way shoppers should read it. Its order decides the order of the lines: use Sort › Manually to put plates first.
- Add the section where you want it: the Hooray and Toast presets have it on the home page; you can also make a page for it. In the section, choose your collections in Party themes.
- Link to it from an empty cart: in the theme editor, open the Cart drawer and the cart page's Cart section, and set Build a party box link to the page the section is on (the Hooray and Toast presets point it at the home page).
Each theme lists the first products in its collection that have a pack size, up to Most items per theme. Products without custom.pack_size are skipped, unless you set Pack size without a metafield. Each line adds the product's first available variant at its price, so per-guest products work best with one variant, or with the variant you want listed first.
With no theme that has a product with a pack size, the theme editor shows four sample lines (marked Sample, with Add party box turned off) and shoppers see nothing.
Settings
| Setting | Default | What it does |
|---|---|---|
| Eyebrow | "Party in a box" | |
| Heading | "Tell us who's coming. We'll do the maths." | |
| Text | "Plates, cups, napkins and favour bags for your guest count, rounded up to whole packs. Untick anything you already have." | |
| Party themes | Up to 6 collections. Each is a theme, and its title is the option name. | |
| Most items per theme | 8 | 4 to 12 |
| Fewest guests | 8 | The stepper's lowest number |
| Most guests | 60 | The stepper's highest number |
| Guests to start with | 24 | Kept between the fewest and the most |
| Pack size without a metafield | For products without custom.pack_size. Blank leaves them out. | |
| Button label | "Add party box" | |
| Background | Bright block B | The sunshine block in Confetti, black tie in Gilt. The list itself sits on a white card. |
| Streamer at the bottom edge | None |
In the cart
The box's lines show together as one card at the position of the box's first line: a head with "Party box" and the box's label ("Rainbow party · 24 guests"), the lines underneath, each with its own quantity stepper and Remove, the Box subtotal, and Remove party box, which removes every line of that box at once. Changing a quantity or removing one line keeps the rest of the box together, and when the last line goes, the card goes. Two boxes added separately stay two cards, even for the same theme and guest count.
What you get on the order
Each line of a box is an ordinary line for that product, so stock, prices and discounts work as usual. Each carries two line item properties:
| Property | Example | Who sees it |
|---|---|---|
Party box | Rainbow party · 24 guests | The shopper in the cart and at checkout, and you on the order, under each item |
_party | rainbow-party-24-k3f9 | A code that ties the box's lines together: the theme's handle, the guest count and four random characters. Properties that start with _ are hidden from shoppers at checkout. |
So on the order you can see which items came as a box, for which theme and how many guests. The label's wording comes from the theme's words: "Party box" can be changed in Edit default theme content (chapter 15).
The theme doesn't discount a box. If you'd like a box price, create an automatic discount in Discounts, for example on the party theme's collection with a minimum quantity, and say so in the section's text.