Hyvä: Guides and Practical Know-how | Page 3 | mironsoft Blog
Hyvä
-
Jan 14, 2026
Anyone who adds an inline script to a Hyva template without the right pattern will eventually see a blocked execution in the browser console instead of a working Alpine widget. CSP in Hyva rests on a clear interplay between Magento_Csp, the HyvaCsp ViewModel, csp_whitelist.xml and a hash mechanism that makes full page cache and a strict Content Security Policy possible at the same time. This article walks through every building block with real code from Magento 2.4.8 and PHP 8.4.
-
Jan 3, 2026
The PHPStorm plugin marketplace lists dozens of plugins that promise to simplify Magento development. In practice, many of them add little value, noticeably slow down the IDE, or are simply irrelevant for Hyva projects. This article separates the real productivity boosters from the resource hogs.
-
Dec 31, 2025
The Magento theme fallback determines which template gets rendered, but says nothing about whether its Tailwind classes actually land in the CSS bundle. Without a correct Hyvä theme fallback setup in the Tailwind content configuration, non-overridden parent templates lose their styling the moment a child theme is activated.
-
Dec 19, 2025
Anyone who wants to register a custom payment method in the Hyvä checkout will not get far with the classic Knockout renderer lists from the Luma checkout. Hyvä checkout resolves payment templates through block aliases in layout XML, while all form logic is built entirely with Alpine.js, phtml templates and PHP view models. This article walks through the full path from the payment method model to template registration, Alpine validation and server-side hooks, all the way to PCI compliance considerations for Magento 2.4.8-p4.
-
Dec 17, 2025
Alpine.js keeps x-data deliberately untyped, which is fine for small snippets but quickly turns into silent bugs, mistyped property names and hard to maintain code once Hyva components grow larger. This article walks through typed factory functions, JSDoc based typing without a build step and a lightweight TypeScript pattern that stays CSP compliant, respects Hyva's no-build philosophy and still delivers real type safety for teams and complex components.
-
Dec 13, 2025
Serving a generic error message with an HTTP status of 200 for a URL that does not exist quietly costs both search engine trust and real users. This article shows how to properly implement 404 and 500 error pages in the Hyvä theme, from the noroute controller through the correct HTTP status code to an Nginx fallback for when PHP-FPM itself stops responding.
-
Dec 8, 2025
How shipping methods in checkout are presented often decides between an abandoned cart and a completed order. In the Hyvä checkout, a lean Alpine.js component that loads its data through a GraphQL availableShippingMethods query replaces the Knockout shipping-rates component. Anyone customizing shipping methods in the Hyvä checkout works with shipping-methods.phtml, ViewModels and custom carrier models instead of uiComponents, observables and RequireJS modules, and gets card layouts, delivery estimates, free shipping thresholds and click and collect as reactive, maintainable building blocks in return.
-
Dec 4, 2025
Magento's native review feature is functionally solid but visually and interactively plain. Building a review UI that actually contributes to purchase decisions means treating the review form as an Alpine component, marking up the star display with correct semantics, and offering sort and filter options without complicating the underlying data model.
-
Dec 3, 2025
A carousel for related products is quick to wire up with a heavy JS library and just as quick to become a performance problem. Staying true to Hyva means building the carousel with Alpine and a minimal Swiper integration, loading images consistently lazy, and honestly asking whether a static grid might not be the better choice after all.
-
Nov 29, 2025
As long as the Tailwind production build runs manually through bin/npm run build on a single developer's machine, the result depends on locally installed Node versions, forgotten intermediate state, and whoever happened to run it that day. This article shows how to set up the build as its own reproducible CI stage, how a build cache noticeably speeds up pipeline runs, and how broken Tailwind classes can be caught automatically before deployment instead of after.