Products With Stock Showing as Sold Out
CompletedYank Carlos
A Shourly user reported two symptoms on the same field: published variants holding inventory rendered as sold out on their storefront, and the availability selector in the product editor appearing inert. Both traced back to how a single value — a variant's availability — was written, read and interpreted.
1. The selector could not be clicked. Every option in the availability menu was rendered in its disabled presentation, which also made it ignore pointer input. The menu opened, looked greyed out and silently swallowed every click, so an availability was never saved. The same defect reached every dropdown of that kind across the dashboard and the storefront, the phone country picker included. Automated coverage had not caught it: the test environment applies no styling and no hit testing, so a simulated click reached the option even though a real one never could.
2. One field, four vocabularies. The product editor saved the availability under its translated label, the spreadsheet importer saved it under its internal key, the editor read it back expecting that key, and the product data published to search engines compared it against the Spanish label alone. No single stored value satisfied every reader, so the same variant could resolve as available on the storefront while being reported as out of stock to Google. The editor also failed to recognise its own writes, which is why the field appeared empty again after saving.
3. An unset optional field read as a negative. Availability is optional, and the section holding it was collapsed by default, so most variants were published without it ever being set. The storefront treated a missing or unrecognised availability as sold out instead of deferring to the stock count, and the product page reduced a three-state field to a binary, presenting "pending" and "in coming" variants as sold out.
Fix. The disabled presentation now applies only to options that are genuinely disabled, and the menu highlights a selection again. The editor stores one canonical value and still understands rows saved in either language. Stock became the source of truth: units on hand resolve to available unless explicitly marked otherwise, and only an explicit unavailable state or a zero quantity resolves to sold out. "Pending" and "in coming" keep their own labels. The data published to search engines goes through that same resolution, and each variant now reports its own stock rather than the default variant's. Availability is derived from the quantity entered and its section is expanded by default, so a stocked product can no longer be published invisible. New regression coverage asserts the condition directly, since a simulated click cannot observe this class of failure.
August 26, 2026
Activity feed
No comments yet, be the first to comment!