Adding a field to a product or an order
«I just need one more field.» It is the request that looks simplest and holds the most surprises, because a field never exists alone: it must be entered somewhere, stored, displayed, found again, exported, printed, and sometimes translated.
The typical need
The requests recur in similar shapes: a free comment per order line, an internal reference on the product page, a case number entered by the customer at checkout, supplier information visible internally only, or regulatory data that must appear on the invoice.
All raise the same underlying question: who enters it, who reads it, and where must the information reappear. A field visible only in admin is quick work. A field entered by the customer at checkout touches the purchase path, validation, the confirmation email and printed documents, which is an entirely different job.
How I approach this kind of work
I start by checking whether the platform already does it. PrestaShop has product features and custom product fields, plus an order comment field; WooCommerce accepts additional data attached to a product or an order without needing a structure to be created. Many requests stop there, and that is a good thing.
When the data must be filterable, validated or reused elsewhere, I create proper storage rather than lodging it in an existing field repurposed for the job. That is where a year of peace is won or lost: data placed in a field designed for something else always ends up clashing with the original function, typically at export or during a migration.
Then I explicitly handle the whole chain: entry, validity checking, admin display, customer display if needed, presence in emails, exports and PDF documents. That list is what separates a genuinely usable field from a field nobody ever looks at.
Related pages
-
Adding a business screen to the back office
When extra fields become numerous enough to deserve their own screen.
-
Generating PDF documents
To make the field appear on an invoice or a delivery note.
-
Saving a product page fails
A common symptom when fields have been added carelessly.
-
Exporting the catalogue and orders
To bring the new field through into a usable export.
Frequently asked questions
Can the field be made mandatory at checkout?
Will the field appear in existing exports?
What happens to the field during a platform migration?
How many fields can be added without degrading the store?
Describe your need in one minute
A few targeted questions so I can reply with an estimate rather than another questionnaire.