Skip to content

Reduce the checkout address form to the essential fields#99

Open
boo-code wants to merge 2 commits into
PrestaShop:mainfrom
boo-code:feat/essential-address-fields
Open

Reduce the checkout address form to the essential fields#99
boo-code wants to merge 2 commits into
PrestaShop:mainfrom
boo-code:feat/essential-address-fields

Conversation

@boo-code

@boo-code boo-code commented Jul 5, 2026

Copy link
Copy Markdown
Contributor
Questions Answers
Description? The inline guest address form shows 12 fields, against Baymard's public research target of 8 (https://baymard.com/blog/checkout-flow-average-form-fields — industry average 11.3, "most sites need only 8 form fields in total"). This implements items 1-3 of #96 in address-fields.tpl: (1) Alias is no longer rendered on the checkout form — a first-time buyer has no basis for naming an address and it was the first field of the form; both save paths already default an empty alias to the translated "My Address" (OnePageCheckoutSaveAddressHandler, OnePageCheckoutForm), and the field stays available in the address modal and the account address book. (2) Address Complement collapses behind a native <details> disclosure ("Add an address complement") — Baymard measured 30% of testers coming to a stop at a visible Address Line 2 (https://baymard.com/blog/avoid-multi-column-forms lists it among fields to hide behind a link via https://baymard.com/blog/checkout-flow-average-form-fields). (3) Company and VAT number collapse behind one "Add company details" disclosure. The disclosures render OPEN whenever the field is required by the country address format, already carries a value (persisted draft or saved address), or has a validation error — so nothing required or filled is ever hidden; no JavaScript is involved (details/summary, exposed as a proper disclosure widget in the accessibility tree), and collapsed inputs still serialize into drafts and autosave. The default guest form now shows exactly 8 fields (e-mail, Country, First name, Last name, Address, City, Zip/Postal Code, Phone). Rebuilt views/public/one-page-checkout.css for the toggle styling.
Type? improvement
BC breaks? no
Deprecations? no
Fixed ticket?
How to test? Fresh guest checkout on a 9.2 shop: the address form shows 8 fields, no Alias, with two closed disclosures ("Add company details", "Add an address complement"). Open the complement, type a value, reload: the draft restores and the disclosure renders open with the value (a filled or invalid field is never hidden). Full order verified end-to-end after the change — placed with an address complement, and the saved address row carries the defaulted alias ("My Address") plus the typed complement. Full unit suite green.

@ps-jarvis

Copy link
Copy Markdown
Collaborator

Hello @boo-code!

This is your first pull request on ps_onepagecheckout repository of the PrestaShop project.

Thank you, and welcome to this Open Source community!

@nico-leb

nico-leb commented Jul 6, 2026

Copy link
Copy Markdown

we do this all the time for merchants! so nice improvement 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready for review

Development

Successfully merging this pull request may close these issues.

3 participants