Skip to content

feat: let any whole number from the minimum order up be ordered - #11

Open
JasonYv wants to merge 1 commit into
feature/shop-exportfrom
feature/quantity-any-above-minimum
Open

JasonYv wants to merge 1 commit into
feature/shop-exportfrom
feature/quantity-any-above-minimum

Conversation

@JasonYv

@JasonYv JasonYv commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Stacked on #10 (the export).

What this is

Two decisions of the owner's (design §11, decisions 11 and 12).

What a quantity must be: at least the minimum order, at most what a line may hold — and not a multiple of the minimum. The server never asked for a multiple. The quantity fields did, by stepping in units of the minimum, so a browser refused what the server would have taken; and with a ceiling of 500 a part with a minimum of 200 could be ordered as 200 or 400 and nothing else. The fields step by one now.

The rounding of a derived price stays as it is: up to the next .99. Nothing changes in the code for it; the design records it.

How it was verified

Check Result
lint, type check, build, both smoke runs, the preview check Pass
Tests inside workerd 811 of 811; one new, which orders seventeen of a part whose minimum is ten
Red and green three deliberate breakages, each noticed: a multiples rule on the server, and the old step on each page

The owner decided what a quantity must be: at least the minimum order, at
most what a line may hold, and not a multiple of the minimum (design §11,
decision 12). The server never asked for a multiple. The quantity fields
did, by stepping in units of the minimum, so a browser refused what the
server would have taken — and with a ceiling of 500 a part with a minimum
of 200 could be ordered as 200 or 400 and nothing else. They step by one.

The design also records the owner's other decision of the day: a derived
price goes on being rounded up to the next .99 (decision 11).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant