SERVER1 / Search

What are you looking for?

Search services, pages and articles. Results appear after 2 characters.

View all articles
Web Hosting & WordPress

WooCommerce says the jacket is in stock. Why can’t I add my size?

Trace one colour and size from the product selector to the cart. A small stock exercise shows when a refusal is correct and when the wrong variation was submitted.

SERVER1.GE8 min read
Folded green and blue shirts, a cream tag and small cubes sit to the left of the headline “In Stock, Can’t Add to Cart”.

Two customers get the same refusal

On the shop floor, the question is whether you can hand the customer the size they chose. In our fictional Tbilisi shop, the theme puts “In stock” on the TRAIL jacket’s category card. Pine green in M is sold out and the refusal is correct. There are two pine jackets in L, yet the exercise shows that choosing L sends the ID for M. Leave the stock alone and follow that selection into the cart.

Start with the exact colour, size and requested quantity. In our fictional shop the labels are Ink, Pine and Clay. A translated storefront may use different words for those colours. Keep the product link and variation ID with the buyer’s description. The same photo, product title or translated colour name can lead staff to the wrong row of a large catalogue.

A woman in an apron holds up a green T-shirt on a hanger beside a folded blue one on the shop counter.
Record both the colour and the size the customer chose. Together they identify the combination to look up in the catalogue.SERVER1 editorial illustration.

Which record gets to say yes?

WooCommerce uses a variable product to hold options such as size and colour. A variation is a particular combination with its own settings. The WooCommerce Variable Products guide describes stock tracking at the product level, at the variation level or in a combination of the two. A variation that draws on a shared quantity must use the same pool as its siblings. If two sizes each draw from four shared units, the shop does not gain eight units by displaying both sizes.

Find the row that matches the colour and size. Check its attributes, price, enabled setting and stock owner. Two details in the WooCommerce guide to variable products can change the diagnosis. A variation may inherit the parent SKU, so even a familiar SKU might identify several options. A row with an “Any” attribute may also overlap an exact pair. Check which matching row comes first. Record these details when you hand the case to the person maintaining the catalogue.

  • Storefront language and product link, with the date of the attempt.
  • Selected colour and size, requested quantity and quantity already in the cart.
  • Expected variation ID and stock owner, including its backorder policy.
  • Submitted ID, resulting cart line or exact refusal message.

Read one colour across two sizes

In the downloadable exercise, the TRAIL parent product (4100) owns a single pool of four units shared by Ink/S (4101) and Ink/M (4102). The two Pine sizes and Clay/M each track their own stock. Stock tracking is on, the out-of-stock threshold is zero and every defined row is enabled and priced. There are no wildcard matches, reservations or extra purchase rules. Each example starts with an empty cart and the same counts. Its observations are prepared CSV records.

Chosen pairStock for this pairExpected for one unit
Ink / M · 4102Four shared units on TRAIL.Add TRAIL-INK-M from the parent pool.
Pine / M · 4103Zero units on TRAIL-PINE-M. No backorders.Refuse this size.
Pine / L · 4104Two units on TRAIL-PINE-L. No backorders.Add TRAIL-PINE-L. Verify the actual submitted ID.
Pine / SNo matching variation or wildcard.No matching option. There is no SKU to restock.
Clay / M · 4105Zero units on TRAIL-CLAY-M. Backorders with notice.Accept as a backorder with the necessary notice.

First predict what one unit should do. The exact Pine/S combination has no row in the fixture, even though Pine and S both exist on the parent. Enabling a new combination is a merchandising decision. If the supplier never makes a small pine jacket, remove the misleading promise in the selector or explain the available sizes. Creating fictitious inventory would turn a selection problem into a fulfilment problem.

Four wooden cubbies contain folded green and blue T-shirts. Two cream tags hang from the shelf.
A different colour on the shelf tells you little about the size a customer wants. Find which stock record governs that combination.SERVER1 editorial illustration.

Pine/L sends the wrong variation ID

In the seeded pine-wrong-id row of observations.csv, Pine/L looks ready and is selected, but the form submits 4103, the ID for Pine/M. The expected ID is 4104 (TRAIL-PINE-L). That’s the first proven mismatch. The recorded refusal doesn’t tell you whether a real store would reject inconsistent attributes, check stock for the submitted ID or use custom matching. It doesn’t identify the script, template or data that supplied the wrong ID, either.

In pine-corrected, the supplied request now carries 4104. The corresponding sample cart contains TRAIL-PINE-L for a request of one. On staging, ask for both pieces of evidence. Does Pine/L submit 4104, and can you see the correct size and quantity in the cart? An enabled Add to cart button, or a line that just says “TRAIL”, can look like success even when a different size was added. The exercise shows the evidence to seek on your copy.

Open products.csv, variations.csv and observations.csv side by side to trace the same path yourself. On a test storefront, an incorrect pairing already present when the form loads points to the template or its data source. If the form starts with the correct mapping, try selecting Pine/L directly, then repeat by switching from Pine/M to Pine/L. A failure only after switching would give the developer a way to reproduce a selector that retains the previous ID.

Which variation did the buyer choose, which ID did the page submit, and whose stock was checked?

SERVER1 editorial stock worksheet

Three results that are easy to misread

Pine/M has zero units of its own and denies backorders. The refusal agrees with the catalogue even while Ink/M is available from the parent’s shared pool. Clay/M can enter the cart with a backorder notice because of its separate policy. Being allowed to order Clay/M says nothing about dispatch today. Have the person responsible for fulfilment check that the message fits what the shop actually promises before treating that path as ready for customers.

Quantity matters as well. The fixture permits one Ink/M but refuses a request for five against four shared units. In a live case, record quantity already in the customer’s cart as well as the quantity just requested. Check whether the shop uses stock counts, manual statuses, reservations, an import from another stock system or a custom per-order limit. A screenshot from before a warehouse update cannot establish the quantity used during a later request. Preserve the times before comparing records or overwriting an imported figure.

Test the selector without disturbing the stock

Use a private copy with the relevant product settings. The SERVER1 WordPress hosting page describes its staging environment. Begin with an empty cart, keep the language fixed and try the ordinary dropdown and the colour swatches separately. Stop at the test cart. If you cannot inspect the request, ask the developer for a redacted trace. A unique SKU can confirm which item reached the cart. Only evidence from the request can confirm the ID that was submitted, and a refusal leaves no cart row to inspect.

If the correct ID still leads to a refusal, verify the stock owner, latest warehouse sync and backorder policy. If these allow the request, send the refusal trace to the developer. If the direct test page works, compare it with the reported storefront, keeping the pair and quantity fixed. Change one factor at a time, such as template, language or session. For suspected caching, compare a cached response with a confirmed fresh one. For a feed, inspect the exact variation and its last update. Record both times. A stale badge can explain the listing without explaining the cart refusal.

A woman looks at a website on her laptop at a desk with a lamp, a mug and an open notebook.
Repeat the colour and size selection on a private copy of the shop, then compare the result with the variation you expect in the cart.Image from SERVER1 WordPress Hosting.

What lets the shop reopen this option?

Save the original setting and change one component on the private copy. For Pine/L, require submitted ID 4104 and one TRAIL-PINE-L in the test cart. For Pine/M, require ID 4103 and a refusal for one. Roll back the change if either control fails. If it changes the shared pool, also retest Ink/M at one and five units. Hold sign-off while the reported storefront path still fails, even if the direct staging page passes.

Give the storefront maintainer the selection and request evidence if the wrong ID was submitted. Give a missing combination or an unclear backorder promise to the catalogue owner. Send a verified stock discrepancy and its sync time to whoever runs the inventory feed. Keep the before-and-after record and both test outcomes. The SERVER1 WooCommerce sale-readiness guide follows that same customer path through selection and the cart when preparing for a promotion.

SERVER1.GE

Not sure which infrastructure fits this workload?

Tell us what you run, your expected traffic and current setup. We will help you narrow down the right option.