Customer Form Fields
Hyvä POS is on the App Store
The free app is out for iPhone, iPad and Mac: install it from the App Store, connect your Magento store and sell. PRO, the Magento module with a license per terminal, follows shortly. News and pricing are at hyva.io/pos.
Two grids in the Magento admin decide which fields the register's customer and address forms show, and in which order. The grids list Magento's own customer and address attributes and the ones an extension adds. Each row can also set how wide the field is, the label the register shows, and whether the field is protected or takes a scan.
Whether a field is required is not set in the grid. Magento's attribute settings decide that, and the register applies them.
Where the Grids Are
Both grids are under Stores → Configuration → Hyvä POS → Terminal Defaults → Customers, set for the default configuration or per website. There is no store view or location setting.
| Grid | Forms on the register |
|---|---|
| Customer Form Fields | Create Customer, Edit Customer and the customer card |
| Address Form Fields | The address book (Add Address, Edit Address), the address block on Create Customer, the ship-to address at checkout, the addresses on the customer card and the billing address in the customer's quick view |
A saved grid reaches the registers at their next heartbeat; see how settings reach devices. A change to an attribute itself, or to Magento's Name and Address Options, reaches them the same way.
Find Customers by Customer ID, between the two grids, is a scanning setting. See What a Scan Finds at the Register.
Working the Grid
Each row is one field on the form. The row order is the order on the register.
- Add Field adds a row. Its Attribute list offers every attribute no other row holds, so each attribute appears once. Once every attribute has a row, Add Field is unavailable.
- An attribute is listed as its label with its code, for example
Tax/VAT number (taxvat). Where Magento requires the attribute, the entry ends in required. - Drag a row by its handle, the first cell of the row, to move it. From the keyboard, each row has Move up and Move down buttons. The new order is saved with the configuration.
- The … button opens the row's settings; see Row Settings.
- The bin removes a row.
- A row with a lock where the bin would be is always displayed and cannot be removed. Its attribute cannot be changed; it can be moved.
The locked rows are the fields every form needs:
- Customer Form Fields: first name, last name and email.
- Address Form Fields: street address, city, country, postcode and state/province.
- In both grids, every attribute Magento requires. On a store with Magento's default attribute settings that adds first name, last name and phone number to the address grid.
A locked field that a saved grid leaves out is still drawn on the register, after the listed rows.
The Customer Form Fields grid also shows Customer Group as a locked row after its own rows. It cannot be moved, removed or set. The register shows the group on Edit Customer, after the grid's fields, to staff whose role has Assign Customer Group. The role decides who sees it, not the grid.
At website scope, Use Default next to each grid makes the website follow the default configuration. While it is checked, the grid shows the default rows and cannot be edited or reordered.
Row Settings
The … button of a row opens its settings. A field the register only shows, or does not show, has no settings to protect or scan into.
Protected
Once the field has a value, only staff whose role has Edit Protected Customer Fields can change it at the website's registers.
- An empty protected field can be filled by anyone who may edit the customer.
- Other staff change a filled protected field with Change with Manager Passcode: a staff member whose role has the permission enters their passcode on the cashier's device.
- On a register where nobody signs in (Require Staff Login off), a filled protected field is read-only for everyone except through Change with Manager Passcode.
Protected applies to every field the register edits, an image included. Magento writes every change to a protected field to the audit log, with the staff member who made or approved it. See Protected Fields for what the cashier sees.
Scan
The register's field takes a barcode from a scanner or the camera. Only text fields can take a scan. On the register the field has a scan button and the line "Scan or type" under it.
Lookup
A scan in the customer picker or on the Customers tab finds the customer by this field. Lookup is offered on text fields of the Customer Form Fields grid only. See What a Scan Finds at the Register.
The Customer Lookup Index
The register does not search the customers themselves. It searches an index of the values in your Lookup fields, which Magento keeps as the indexer Hyvä POS Customer Lookup under System → Index Management.
When you check or clear Lookup on a field, the index has to be rebuilt:
- Saving the grid marks the index "Reindex required".
- Magento's cron rebuilds it on its next runs.
- Until it is done, the customer grid in the admin shows "Customer lookup is waiting to be updated." or "Customer lookup is being updated.", with "Newly checked Lookup fields may not find customers until the update finishes."
To rebuild the index at once:
After that, the index stays up to date on its own in both of Magento's indexer modes:
- Update on Save: every customer save or delete through Magento updates the index right away, from the admin, the storefront, the REST API and the register. A customer import marks the index "Reindex required", and cron rebuilds it.
- Update by Schedule: Magento's cron applies every change, including imports and direct database changes.
The module does not choose a mode. The Mode column in Index Management shows which one the index runs in.
If a scan does not find a customer you expect:
- Check that the field has Lookup checked on the customer's website and that the customer has a value in it.
- Check the customer grid for one of the two messages above.
- Check that Magento's cron runs. Without it the index is never rebuilt.
- Rebuild the index with the command above.
Find Customers by Customer ID does not use the index. It reads the ID from the customer, so it works without a rebuild.
Width
How much of a line the field takes on the register:
- Automatic: the register's own layout. This is the default.
- Full width: the field takes the whole line.
- Half width: the field takes half the line.
A text area, a multiple select, an image and a file always take the full width. The width applies on iPad. On iPhone, every field takes the full width.
Label
The text the register shows in place of the usual label, in every store view of the website. Leave it empty to keep the usual label. On save, spaces at both ends are removed, runs of white space become one space, and the label is cut at 60 characters.
Street Lines
The street address row takes no Width and no Label: the street always takes a full line of the form. It has two settings of its own:
- Street lines: One column, the default, shows one street line per row. Two columns shows the street lines two per row, at equal width. This applies on iPad; on iPhone the street lines are one per row.
- Show as street and house number: the register shows street line 1 and street line 2 next to each other, as Street and House number. The Street lines choice applies to the lines after the first two.
Both need a street of two lines or more. Set Number of Lines in a Street Address to 2 or more in Stores → Configuration → Customers → Customer Configuration → Name and Address Options. With fewer lines both settings are unavailable. A choice saved before is kept, and applies again once the street has two lines.
What the Grids Decide
Who can edit the listed fields
A listed customer field can be edited by staff whose role has Edit Customers, and a listed address field the same way. A field marked Protected takes Edit Protected Customer Fields once it has a value. A field that should be maintained in the Magento admin only is left out of the grid. See who may work with customers.
A field the storefront hides can be listed
The grids offer an attribute whether or not the storefront shows it. Hiding the date of birth or the Tax/VAT number in Stores → Configuration → Customers → Customer Configuration → Name and Address Options removes it from the storefront; listing it in the grid still draws it on the register. A listed field is required on the register when the attribute is set to required, whether the storefront shows it or not. A hidden attribute that is not listed is not added to the register's forms.
Which extension attributes are offered
An attribute an extension adds is offered when Magento treats it as a custom attribute of the customer or the customer address: an attribute in the attribute set that is not a system attribute. An attribute created as a system attribute (the default of Magento's customer setup) is not offered; its extension has to create it with system set to false.
Hyvä POS's own POS Credit Limit and POS Credit Limit Disabled attributes are never offered: a credit limit is set in the Magento admin, not at the counter.
Before the grid is first saved
A grid that has never been saved shows the fields the register showed before the grids existed, worked out per website:
- Customer Form Fields: first name, last name, email and Tax/VAT number.
- Address Form Fields: first name, last name, company, street address, country, state/province, city, postcode, phone number and VAT number, plus the name prefix, middle name, name suffix and fax where Name and Address Options shows them.
The register's forms follow those rows until the grid is saved, so installing or updating the module changes no form. Saving the grid stores the rows as they stand. A grid saved with no rows shows the required fields only.
The ship-to address shows only what an order address can carry
The ship-to address at checkout draws the address grid's rows that a Magento order address has a field for: name prefix, first name, middle name, last name, name suffix, company, street address, city, state/province, postcode, country, phone number, fax and VAT number, in the grid's order. An attribute an extension adds is never on the ship-to address, because the order cannot store it. The ship-to address always has an Email field after the name, which the order needs.
On the ship-to address, the phone number, company and fax are required where Magento requires them.
The other two address forms differ as well: the address book adds the default billing and default shipping switches, and the address block on Create Customer leaves out the name, which the customer's own fields carry.
The country decides postcode and state
Postcode and state/province are on every address form, listed or not. Whether they are required depends on the country picked, the way Magento's own address checks decide it:
- A postcode is required unless the country is in Stores → Configuration → General → General → Country Options → Zip/Postal Code is Optional for.
- A state/province is required when the country is in State Options → State is Required for on the same page.
When the cashier changes the country, the register decides both again.
Field Types
The grids offer every input type. The register draws them as follows:
| Input type in Magento | On the register |
|---|---|
| Text Field | A text field |
| Text Area | A text area |
| Dropdown | A picker of the attribute's options |
| Multiple Select | A list of the attribute's options, several can be picked |
| Yes/No | A switch |
| Date | Typed as day, month and year |
| Multiple Line | The street address: one line per street line the store is set to |
| Image, on the customer | A thumbnail that opens full size, with Take Photo, Choose Photo and Remove on the forms |
| Image, on an address | A thumbnail, shown and not changed |
| File | The file's name. The file is in the Magento admin |
| Hidden | Not shown |
A multiple-line attribute other than the street address, and an input type the register does not know, are shown and cannot be edited. In the grid, a row the register does not edit carries a note saying what the register does with it, for example "The register shows the file's name; the file is in the Magento admin."
When Magento requires an attribute the register cannot fill:
- A warning above the grid names it, for example "Magento requires these customer fields, and the register cannot fill them: …". It says to make each field optional or give it an input the register can edit: in Adobe Commerce under Stores → Attributes → Customer or Customer Address, otherwise in the extension that adds it.
- The register's Create Customer, Edit Customer and address forms show one line naming the field and saying to set it in the Magento admin.
An edit made on the register keeps the stored value of every attribute it does not send. Edit Customer sends the fields on the form; the module keeps every other stored attribute of the customer, a file included. An address saved from the register likewise leaves the attributes it does not show as they are. Magento still refuses a save while a required attribute has no value at all, so a customer who has nothing stored for such an attribute is completed in the Magento admin.
On the Register
- Fields the register knows (name, email, address fields, date of birth, gender, Tax/VAT number) keep the register's own labels in the device's language. Other attributes show the label of the store view. A Label set on the row replaces either.
- Create Customer shows the customer grid's fields while Create Account in Magento is checked. Unchecked, the customer stays on the device and the form shows the name and email only.
- The customer card shows every field of the customer grid, in the grid's order. An empty field shows a dash, an image a thumbnail and a file its name. First name, last name and email are not repeated under the header.
- The card's address list, the ship-to address at checkout and the billing address in the customer's quick view show every field of the address grid.
See Customers for dates, images, scanning into a field, and what happens when a customer was changed elsewhere.
Requirements
- Hyvä POS PRO on a device activated on a terminal, with a valid license.
- Module 1.7.0 or later.
- The register at 0.6.0 or later.
A register before 0.6.0 keeps its built-in forms on module 1.7.0; the grids do not apply to it, and module 1.7.0 refuses its customer requests (see Registers Before 0.6.0). A 0.6.0 register on a module before 1.7.0 builds its address form from Name and Address Options, as before. Without PRO, or when the license is no longer valid, the register shows its built-in forms.