Repository navigation
fix(content): say "not in stock" for a shopping product with no variant in stock, not "sold out" - #1662
Merged
Conversation
…nt in stock, not "sold out" Follow-ups from ansvisor#1610 (item 2) and ansvisor#1607 (item 3). A product is taken as not selling when none of its variants is in stock: sold out, but also pre-order, back-order and no stock given. The editor called all of them "sold out": the Insert › Products dialog, the shopping path's Left out list, the Rules tab's and Before you publish's Shopping rule and its items, and the note that Content Agent doesn't change product links. They now say "not in stock" ("No out-of-stock or refused product linked" for the rule). The API's `sold_out` reason and state stay as they are; the product dialog's message key is renamed to notInStock to match. Co-Authored-By: Claude Opus 5.5 <[email protected]>
9 of 12 tasks
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
This was referenced Oct 28, 2026
gkhngyk
approved these changes
Oct 28, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
Looks good, with follow-ups.
What I checked:
- Own change. 0443305 on main (3f6a4d4). It merges cleanly on main, #1653 and #1654. With #1663 or #1664 there's one conflict, the one the description names: the Products sentence in
docs/guides/content-editor.mdx. The combined sentence proposed in the description is right. - Every place a user saw "sold out" now says "not in stock": the Add › Products dialog (
soldOut→notInStock; nothing else used the old key), the Brief's Left out reason, and the Rules tab and Before you publish items. On this head,sold outappears inweb/srconly in comments and test names, and the API'ssold_outstate is unchanged. - Tests. The five touched test files pass. With main's
en.jsonand dialog put back, four of them fail, one per place.
Follow-ups (low):
- The rule's new name, "No out-of-stock or refused product linked", and the agent's
notForAgentShoppingand #1654'snotForAgentFeedShoppingsay "out of stock". That's the same mismatch as "sold out" for a pre-order or back-order product. "not in stock" there too would match the items under the rule. - The two stale comments the description lists (
_rules-tab.tsx:567,shopping-check.ts:26).
Before the API deploy: web and docs only. Nothing depends on the API.
7 of 12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-ups from #1610 (item 2) and #1607 (item 3). The editor says "not in stock" instead of "sold out" for a catalog product with no variant in stock. That covers sold out, but also pre-order, back-order and no stock given, so "sold out" was wrong for most of them.
Changed wording:
The API's
sold_outreason and state are unchanged. The product dialog's message key is renamedsoldOut→notInStock.Merge note: this PR and #1663 (one price rule) change the same sentence in
docs/guides/content-editor.mdx(line 158). Whichever merges second needs a one-line merge. The combined sentence reads: "…price (in stock before low stock, then its cheapest variant there; a sale price when it's lower)… A product no longer in stock by the time you insert is left out…". I'll merge main forward after the first one merges.Where people see it: a shop draft's Add › Products. Checked in the browser (local, 1024 px) with a temporary catalog on the demo brand: an out-of-stock product reads "Not in stock" and can't be picked. The temporary rows were deleted afterwards.
Related issue
Follow-ups from #1607's and #1610's reviews.
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
grep -rni "sold out" web/src web/messages docs: only the API'ssold_outkey is left.Follow-ups: two code comments still name the old rule (
_rules-tab.tsx,shopping-check.ts).notForAgentShoppingsays "out of stock", which could become "not in stock".Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)Full checks were run once, in one tree with this batch's six follow-up branches merged (#1653, #1654 and the four PRs of this batch):
npm test: 249 files, 3,356 tests passed;vitest(445 files, 4,350 tests) and build: all pass.A pre-push review was done, and its findings for this branch are fixed.
🤖 Generated with Claude Code