Select Page

How to Compatible the module with Hyvä

Shreyas Vispute
Published: May 8, 2022

In this blog, we will see an overview of the compatible module and some prerequisites, tips, and naming conventions before beginning with working on the Compatible module.

Modules based on the Magento luma or Blank themes require a Compatible module to work with Hyvä. The amount of work to create a compatibility module depends on the original module.

Because the compatibility module re-implements the code of a module that doesn’t work out of the box in a Hyvä storefront. The code is based on jQuery and Knockout which Hyvä doesn’t support instead it uses AlpineJs and TailwindCSS.

Few requirements you must know to work with compatible modules.

Note:- Please read the blogs about TailwindCSS, AlpineJs, ViewModels, and Essentials require before going to work with the compatibility module. Otherwise, you will face difficulties while working on a compatible module.

Tips for Compatible Module

It helps to have a second store view running with a Magento Luma theme next to the store view using Hyvä.

Searching for an experienced
Magento 2 Company ?
Read More

This allows checking how exactly some aspect of a module works in Luma while making it work in Hyvä.

Naming Conventions

The module name consists of the Hyva namespace with the original module namespace and module name.

Magento Module:

For example:

Original: Webkul_CompatibleModule
Compat Module: Hyva_WebkulCompatibleModule

Composer Package:

The composer vendor’s name is hyva-themes.

For example:

Original: webkul/magento-compatiblemodule
Compat Module: hyva-themes/magento2-webkul-compatiblemodule

Folder Structure

Hyvä modules and compatibility modules use the following folder structure and minimal set of files:

Any tests go into a tests/ directory on the same level as src/

The basic folder structure includes the and files are already present in new Compatibility Module repositories.

The file is a copy of the Hyvä Themes Software User License and must not be changed.

The file contains basic information about the original module. You can add any additional information that might be required for the Compatibility Module to work.

Previous Blog link : – How to work with sectionData in Hyvä