Skip to main content

Hyvä templates and Tailwind

What it does​

Change EasyQuote's storefront markup in a Hyvä theme, and make sure the Tailwind classes it uses end up in your theme's CSS. On Hyvä, the Hyva_MageMeEasyQuote companion replaces the base module's Luma templates with Alpine.js and Tailwind versions.

Before you start​

  • A Hyvä child theme under app/design/frontend/<vendor>/<theme>, with its Tailwind build working (web/tailwind, npm run build).
  • The companion mageme/module-easyquote-hyva installed, see Hyvä, Hyvä Checkout and Breeze. Companion 1.4.11 needs EasyQuote 1.7.5 or later, and EasyQuote 1.7.5 needs companion 1.4.10 or later, so update both together.
  • Shell access to run bin/magento and npm on the store.

Steps​

Know which template renders​

The companion registers itself in Hyvä's compatibility registry (Hyva\CompatModuleFallback\Model\CompatModuleRegistry, in etc/frontend/di.xml) as the compat module of MageMe_EasyQuote. On a Hyvä theme, a template named MageMe_EasyQuote::… is looked up in this order:

  1. Your theme: app/design/frontend/<vendor>/<theme>/MageMe_EasyQuote/templates/…
  2. The companion: Hyva_MageMeEasyQuote/view/frontend/templates/…
  3. The base module: MageMe_EasyQuote/view/frontend/templates/…

The companion ships its own copy of these templates:

Area Templates
Cart and mini cart cart/cart_button.phtml, cart/minicart_button.phtml, cart/button_init.phtml, cart/quote_number.phtml, cart/minicart_quote_number.phtml, cart/cart_drawer_extend_script.phtml
Request form request/form.phtml, request/form/field/*.phtml, request/form/custom_field/*.phtml, request/form/script.phtml, request/form/submit.phtml, request/form/validation.phtml, request/success.phtml
Customer account customer/account/quotes.phtml, view.phtml, items.phtml, totals.phtml, decline.phtml, quote_status.phtml, quote_date.phtml, quote_view_buttons.phtml
Quote lines and orders quote/item/renderer/default.phtml, quote/item/qty/tier.phtml, order/view/comments.phtml
Page script init.phtml

The companion also adds its own layouts:

Layout What it does
default_hyva.xml In the cart drawer (cart-drawer.totals.before) adds eq-quote-number (cart/minicart_quote_number.phtml) and hyva-minicart.mm.easyquote.request.button (the base module's cart/minicart_button.phtml, which falls back to the companion copy). In before.body.end adds mm.easyquote.quote.cart.number.script (cart/cart_drawer_extend_script.phtml) when the mini cart is shown.
hyva_easyquote_quote_index.xml, hyva_easyquote_quote_view.xml Remove the Luma css/quote.css.
easyquote_cart_quote_number.xml Adds additional.product.info with mm.easyquote.quote.cart.number and mm.easyquote.quote.cart.comment to the cart page. A companion observer adds this handle on Hyvä themes on checkout_cart_index.
easyquote_quote_view_title.xml Puts quote.status, quote.date and easyquote.quote.info.buttons inside easyquote.quote.view, instead of the page title. A companion observer adds this handle on Hyvä themes for the quote and decline pages.
  1. Find the template in the companion first. Only templates the companion doesn't ship fall back to the base module.
  2. Copy it to app/design/frontend/<vendor>/<theme>/MageMe_EasyQuote/templates/ under the same relative path. Use the MageMe_EasyQuote folder name, not Hyva_MageMeEasyQuote, except for the few templates named Hyva_MageMeEasyQuote::…, see Limits.
  3. Change the copy.
  4. Rebuild the Tailwind CSS of your theme, as described below.
  5. Run bin/magento cache:clean layout block_html full_page.

Keep Tailwind in step​

Tailwind only generates the classes it finds in the files it scans. The companion lists itself in app/etc/hyva-themes.json, so Hyvä's build tools add it to your theme's sources:

Theme build How the companion's classes get in
Tailwind 4 (Hyvä 1.4 themes, tailwind-source.css) npm run build runs hyva-sources first, which writes @source "…/Hyva/MageMeEasyQuote"; into web/tailwind/generated/hyva-source.css. The whole companion folder is scanned.
Tailwind 3 (tailwind.config.js) The companion's view/frontend/tailwind/tailwind.config.js is merged into your config. It scans ../templates/**/*.phtml and ../layout/**/*.xml and has a safelist of the default form classes plus a pattern for mb-, mt-, p-, text-, bg-, border-, rounded-, focus-, ring-, w- and h- classes.
  1. After each companion update, rebuild your theme's CSS: in app/design/frontend/<vendor>/<theme>/web/tailwind, run npm run build. The release notes of 1.4.7 and 1.4.9 ask for this.
  2. If you enter classes in the Hyvä Theme Developer settings, add them to your theme's sources too. Those values live in the database, where Tailwind can't see them. On Tailwind 4, list them with @source inline("…") in tailwind-source.css. On Tailwind 3, add them to safelist.
  3. Run bin/magento cache:clean full_page.

The Hyvä Theme Developer settings set the classes of the request form fields: Field Block CSS Class, Field Label CSS Class, Field Comment CSS Class, Text Input CSS Class, Message Textarea CSS Class, Dropdown CSS Class, Radio Button CSS Class, Radio Label CSS Class, Checkbox CSS Class, Checkbox Label CSS Class and Validation Message CSS Class.

What you should see​

The storefront page shows your markup, and the Tailwind classes in it are styled. If a class from your template has no effect, it is missing from the built styles.css.

Limits​

  • A template named MageMe_EasyQuote::… is overridden only from the MageMe_EasyQuote folder in your theme. A Hyva_MageMeEasyQuote folder in the theme has no effect on it. The companion names a few templates with its own module: cart/minicart_quote_number.phtml, cart/button_init.phtml, request/form/validation.phtml and init.phtml. Those are overridden from a Hyva_MageMeEasyQuote folder in your theme, and a copy in MageMe_EasyQuote has no effect on them.
  • The class values you type in Hyvä Theme Developer are not scanned by any Tailwind build.
  • The companion's tailwind.config.js is a Tailwind 3 file. A Tailwind 4 build doesn't read its safelist: hyva-sources adds the companion folder with @source only, and Tailwind 4 loads a JavaScript config only through @config.
  • The Request a Quote buttons use the theme's secondary button style as long as Custom Button CSS Classes is empty or has its default value. Once you enter your own classes, the cart page button gets the theme's primary button classes plus yours, and the mini cart button gets only yours.

Troubleshooting​

  • The request form fields have no styling. Rebuild the theme CSS with npm run build and check that generated/hyva-source.css lists the companion folder.
  • Your template copy has no effect. Check that the copy sits under MageMe_EasyQuote/templates/ in the theme the store view uses, then clean the block_html and full_page caches.
  • Styling broke after an EasyQuote update. The companion's templates may use new classes. Rebuild the theme CSS.

What's next​

Applies to EasyQuote 1Last reviewed November 28, 2026