We recommend you configure Magento with the following settings:
The number of street lines is by default 2. However, within a lot of countries the street lines each have their own purpose: Street, house number, house number addition. Because of this (and the workings of LokiCheckout extensions) we strongly recommend you to change the number street lines to 3.
magerun2 config:set customer/address/street_lines 3
Less is more. The more fields a customer needs to fill in, the less likely the checkout will be completed. We recommend you to get rid of a couple of fields, if they are not relevant:
customer/address/middlename_show
);customer/address/suffix_show
);customer/address/dob_show
);customer/address/fax_show
);customer/address/telephone_show
) or at least make it optional;That being said, the LokiCheckout is compatible with all of these settings.
Magento formats an address (so, a shipping address or billing address) by using so-called address templates. The LokiCheckout uses this existing logic in various places: The address in the billing step, when it is the same as the shipping address, the sidebar preview, possibly other places. Likewise, the same address template is applied to other places (customer addressbook, email templates), so it definitely is worth checking if the address template matches what you need.
The address template used by the LokiCheckout is configured via the configuration path customer/address_templates/html
. The (US-based) default looks like this:
{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}{{depend firstname}}<br />{{/depend}}
{{depend company}}{{var company}}<br />{{/depend}}
{{if street1}}{{var street1}}<br />{{/if}}
{{depend street2}}{{var street2}}<br />{{/depend}}
{{depend street3}}{{var street3}}<br />{{/depend}}
{{depend street4}}{{var street4}}<br />{{/depend}}
{{if city}}{{var city}}, {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}<br />
{{var country}}<br />
{{depend telephone}}T: <a href="tel:{{var telephone}}">{{var telephone}}</a>{{/depend}}
{{depend fax}}<br />F: {{var fax}}{{/depend}}
{{depend vat_id}}<br />VAT: {{var vat_id}}{{/depend}}
For a Dutch shop, the following probably makes more sense (mainly making the street parts no longer separated with newlines):
{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}{{depend firstname}}<br />{{/depend}}
{{depend company}}{{var company}}<br />{{/depend}}
{{depend street1}}{{var street1}}{{/depend}}
{{depend street2}}{{var street2}}{{/depend}}
{{depend street3}}{{var street3}}{{/depend}}
{{depend street4}}{{var street4}}{{/depend}}<br/>
{{if city}}{{var city}}, {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}<br />
{{var country}}<br />
{{depend telephone}}Tel: <a href="tel:{{var telephone}}">{{var telephone}}</a>{{/depend}}
{{depend fax}}<br />Fax: {{var fax}}{{/depend}}
{{depend vat_id}}<br />BTW: {{var vat_id}}{{/depend}}
Note that it is not uncommon the update this address template, for instance if additional EAV attributes are added to your address entity.
More specific to the LokiCheckout, there are some choices to make as well:
The entire checkout gets a specific layout via a theme - like a multi-step checkout (default
) and a one-step check (onestep
): You can configure the theme via the configuration path Loki > Loki Checkout > General > Theme (loki_checkout/general/theme
).
Within the checkout, each address is composed out of address fields (first name, company, etcetera), where each field actually resembles a layout-based block. To order these blocks, we're not using the default but a so-called grid layout (defined in an XML file etc/loki_checkout.xml
). Which grid layout is used, is configured via the configuration path Loki > Loki Checkout > General > Grid Layout (loki_checkout/general/grid_layout
).
On top of this, it is probably good to pick various modules, on top of the core module.
At this moment, CSP is fully supported by the Loki Checkout. All inline JavaScript of all LokiCheckout extensions supports the CSP policies of removing unsafe-eval
and unsafe-inline
. However, because Loki Checkout is just an extension within a theme based on Hyvä and/or Luma, the real question is whether they support unsafe-eval
and unsafe-inline
properly.
If you want, you can enable the LokiCheckout_Csp
module which replaces the normal Hyvä version of AlpineJS with the CSP build of AlpineJS. It also enables CSP in strict mode in the checkout.
Alternatively, you can also disable CSP by enabling CSP reporting (and disable or remove the LokiCheckout_Csp
module):
magerun2 config:store:set csp/mode/storefront_checkout_index_index/report_only 1