Skip to content

2. Understanding luma-theme based checkouts

Choosing a “fallback” checkout

There are a number of existing checkout modules that are based on the Magento luma-theme or the blank-theme:

The list includes, but is not limited to,

  • Magento_Checkout (the default Magento checkout)
  • OneStepCheckout
  • Amasty_Checkout
  • Danslo_CleanCheckout / Rubic_CleanCheckout
  • Mageplaza_Osc

They all can be used with Hyvä, but are built to work with the traditional Magento “Luma” frontend.

The theme-fallback module

To support these types of checkouts, the Hyvä frontend theme has to be deactivated for the checkout routes, while a regular Magento theme has to be activated.

This means that the regular Magento CSS and JavaScript needs to be loaded instead of Tailwind CSS and Alpine.js.

Hyvä supports this through the hyva-themes/magento2-theme-fallback module.

This module allows to configure Magento routes and request paths for which a different theme will be active.

Setting a fallback theme

In the store configuration you can configure the theme that should be used instead of Luma.

By default, the module is configured to fall back to frontend/Magento/luma.

If you want to use a different theme, configure your theme name instead.

Important

The fallback theme has to be a traditional Magento blank or Luma based theme!

These Checkouts will not work using a Hyvä theme, because RequireJS, Knockout, jQuery and the default Luma styles are expected to be available!

Using such a checkout will require additional work to match the styling of the Hyvä theme.

Note

For the standard Magento Luma checkout there is a convenience module hyva-themes/magento2-luma-checkout.
It has a composer dependency on magento2-theme-fallback and will automatically provide the required configuration for that module so the Luma checkout “just works”. This makes it a bit more convenient compared to installing and configuring the magento2-theme-fallback manually.

More information can be found at the Luma Theme Fallback documentation.