Reduce the checkout address form to the essential fields#99
Open
boo-code wants to merge 2 commits into
Open
Conversation
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! |
|
we do this all the time for merchants! so nice improvement 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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). Rebuiltviews/public/one-page-checkout.cssfor the toggle styling.