Hyvä: Guides and Practical Know-how | Page 9 | mironsoft Blog
Hyvä
-
Apr 6, 2025
CMS blocks in Magento are edited by content editors in the WYSIWYG, not by developers in phtml files. Without fixed Hyvä CMS block styling conventions, inconsistent layouts appear, along with broken utility classes the Tailwind JIT compiler never generated, and CSP violations from inline styles. A small, documented class set solves this problem for good.
-
Apr 4, 2025
A product attribute in Magento 2 is quick to create. It only becomes truly valuable once admin maintenance, EAV setup, frontend output and a clean widget in the theme all fit together. That is exactly what this tutorial is about.
-
Mar 31, 2025
A custom IntersectionObserver for lazy loading or a hand written height transition for an accordion are quick to type, and just as quick to get wrong. The official Alpine plugins x-intersect and x-collapse solve exactly these recurring problems declaratively, tested, and CSP friendly, once you wire them into a Hyva theme correctly.
-
Mar 25, 2025
A mini cart preview shows the customer instantly what is in the cart, without leaving the product page. With Alpine.js this flyout can be built as a lean x-data component that catches section data events, changes quantities live and does all of this without jQuery or extra libraries.
-
Mar 24, 2025
Anyone who writes business logic directly into block classes ends up with Magento templates that can neither be tested in isolation nor reused cleanly. The Hyvä ViewModel pattern strictly separates data preparation from presentation, makes every rule verifiable as a plain PHP class with PHPUnit, and keeps phtml templates limited to pure output.
-
Mar 13, 2025
An additional checkout step, for example a gift wrapping selection or an age verification, cannot simply be bolted onto Magento 2 with a template override. With Hyvä Checkout and Magewire, a custom checkout step becomes a properly registered, server side validated component, without KnockoutJS and without fragile jsLayout merges.
-
Mar 12, 2025
Editorial content from the admin panel lands in Hyva without Knockout.js and without UI components, sitting directly inside the utility first layout, which means WYSIWYG markup has to be deliberately reconciled with Tailwind classes instead of simply being included. Teams that structure Hyva CMS blocks and widgets cleanly from the start save themselves CSP rework, FPC invalidation problems and inconsistent typography further down the road.
-
Mar 9, 2025
Hardcoding header and footer markup directly into a phtml template costs real time on every theme update and every module extension: blocks cannot be moved cleanly, third-party modules find no entry point, and every customization ends up as a full template copy. Structuring the Hyvä header and footer layout XML solves exactly this problem, with containers, blocks and ViewModels that keep working after the next Hyvä update.
-
Mar 5, 2025
Anyone who does not know the exact order in which Magento and Hyva resolve a template between module, parent theme and custom theme wastes time on overrides that seem to have no effect. The Hyva fallback mechanism follows a fixed, deterministic order that can be used deliberately once you understand it, without duplicating the parent theme or blocking future updates.
-
Feb 27, 2025
Magento's old jQuery based validation.js does not fit a theme without jQuery, nor a strict Content Security Policy. Alpine based live validation closes that gap, but it never replaces server side checking, since every client side rule can be bypassed with JavaScript disabled or a direct POST request.