ByteBite Docs
Architecture

Menu sizes

One required size per line when a product has active variants.

Menu sizes

A product without an active size still sells at menu_items.price_cents. Each size has its own absolute price in cents. When at least one size is active, the guest must choose exactly one, and the cart line uses that price. If every size is inactive, the product falls back to the item price.

Two sizes of the same product are two cart lines. The same size merges quantity. Checkout snapshots name and variant_name separately. unit_price_cents is the resolved size price. Deleting a size later does not change the order, because the order stores the name and not a foreign key.

PUT /dashboard/restaurants/:restaurantId/items/:itemId/variants replaces the size list. The item PATCH leaves sizes in place. A size that is still in a cart cannot be removed (409). A missing size on add is 400 and does not change the cart. An inactive or deleted size fails checkout with 409 and leaves the cart in place.

Luigi's Diavola ships with 26 cm (1000) and 32 cm (1300). Margherita has no sizes, so existing pickup and delivery checks stay on the item price.

Extras, required option groups, multi-select, size-dependent add-on prices, and allergens are not in this slice.

On this page