My fractional number got stored as a whole integer. Why?

Quick Answer

You saved 27.25 to a custom field and it came back as 27? The field is set to Number (whole) type, which is integers-only by design.

The Fix

  1. Go to Settings → Custom Fields.
  2. Click Edit on the affected field.
  3. Change Field Type from Number (whole) to Decimal / Float.
  4. Save.
  5. Re-enter the value on any affected products — they need to be re-saved to pick up the new field type.

Why It Works This Way

Two separate numeric types exist for a reason:

Type Best for Behavior
Number (whole) Quantities, case-pack counts, item-per-box Truncates fractions: 27.25 → 27
Decimal / Float Dimensions, weights, prices, rates Preserves fractions: 27.25 → 27.25

The truncation isn't a bug — it's the contract for "quantity" fields. Buying half a unit doesn't make sense. But for measurements, fractions matter — half a yard of vinyl is a real thing.

Tip: If you're not sure which to pick, ask: "Could this value ever be non-whole?" If yes, use Decimal / Float.

See also: Custom Fields for Vertical-Specific Attributes

Last updated May 26, 2026
Was this helpful?