Important
You are browsing upcoming documentation for version 7.1 of OroCommerce, scheduled for release in 2027. Read the documentation for the latest LTS version to get up-to-date information.
See our Release Process documentation for more information on the currently supported and upcoming releases.
Reuse and Customize the General Storefront Features
OroHeadlessStorefrontBundle provides the following parts that other headless application types can reuse:
The form fields and page blocks of the application form, view page, and edit page.
The website start scope of the system configuration settings.
The bundle parameters.
For the extension points of OroHeadlessApplicationBundle, see Add and Customize Headless Application Types.
For a step-by-step guide, see Create a New Headless Application Type.
Reuse the Form Fields and Page Blocks
The website field and each of the application_urls, application_logo, and contact_request_form blocks
consist of a form extension and page listeners. The last constructor argument of each of these classes is the type
name.
To add a field or a block to your type, declare new services of the same classes with the name of your type. For the classes, the service definitions, and the priorities, see Add the Form Fields and Page Blocks.
The contact_request_form block has the following requirements:
Declare its services only when OroContactUsBundle is installed.
Add the
application_urlsblock too. The allowed domains of the embedded form come from theapplicationUrlfield.Do not declare a form handler listener. The listener of OroHeadlessStorefrontBundle already processes the forms of all types. For more information, see Contact Request Form.
Use the Website Start Scope
OroHeadlessStorefrontBundle registers the scope identifier provider of the website system configuration scope. The
provider returns the website field of an application of any type. To store the system configuration settings of
your type per website, use website as the start scope and add the website field to your type. For the
system configuration services, see
Add System Configuration Settings to a Type.
Change the Bundle Parameters
The bundle defines the following parameters:
oro_headless_storefront.general_storefront.config_keys— The system configuration settings of thegeneral_storefronttype.oro_headless_storefront.session_transfer_checkout.application_types— The application types whose URLs and logo the checkout in Session Transfer mode uses. The default value contains only thegeneral_storefronttype.
To change a parameter, redefine it in the Resources/config/services.yml file of your bundle. Your bundle must load
after OroHeadlessStorefrontBundle. For this reason, give your bundle a priority higher than 116 in its
Resources/config/oro/bundles.yml file.
Customize the Checkout in Session Transfer Mode
To change the checkout layout in Session Transfer mode, add a layout update for the oro_checkout_frontend_checkout
route with the context["is_in_session_transfer_mode"] condition. For the blocks that the bundle adds and changes,
and for the values of the session_transfer_checkout_url and session_transfer_checkout_logo layout data
providers, see Checkout in Session Transfer Mode.
The following layout update in the Resources/views/layouts/<theme>/oro_checkout_frontend_checkout/ directory of
your bundle adds a link to a help page. Replace <theme> with the name of your theme:
layout:
actions:
- '@add':
id: acme_checkout_help_link
parentId: session_transfer_checkout_actions
blockType: link
options:
path: 'https://example.com/help'
text: acme.checkout.help_link.label
conditions: 'context["is_in_session_transfer_mode"]'
The styles of the checkout in Session Transfer mode are SCSS variables in the
Resources/public/default/scss/variables/session-transfer-checkout-config.scss file of the bundle. Each variable
uses the !default flag. As a result, your theme can override it in a variables file of your bundle. For how to
register the file, see Styles Assets Organization.