Adobe Commerce - Hyvä Theme - Upgrading to 1.0.0 (from 0.7.0 pre-release version)
Release 1.0.0 is the first stable release of the Hyvä theme compatibility modules for Adobe Commerce (the
commerce-metapackage). It provides Hyvä storefront compatibility for the Adobe Commerce-only features (Gift Card, Gift
Wrapping, Reward Points, RMA, Multiple Wishlist, Customer Balance, Customer Custom Attributes, Catalog Events and more).
This upgrade guide covers notable changes from the previously released early access version:
0.7.0.
Prior changes are not covered (i.e. 0.6.x and lower).
Info
This release is primarily consolidation, hardening and bug fixes rather than new features - duplicated logic has been moved into the base modules, several templates have been migrated from Magento helpers to Hyvä View Models, CSP inline-script registration has been corrected, and a number of rendering/escaping bugs have been fixed. There are no new storefront features.
Notable news
CSP inline-script registration corrected
Across several modules, the CSP inline-script registration was being invoked with short-echo tags
(<?= $hyvaCsp->registerInlineScript(); ?>) even though \Hyva\Theme\ViewModel\HyvaCsp::registerInlineScript() returns
void and echoes its output internally. This was changed to the statement form
(<?php $hyvaCsp->registerInlineScript(); ?>).
- Affected templates:
Hyva_MagentoCustomerBalance::php-cart/totals/js/customer-balance-js.phtmlHyva_MagentoGiftWrapping::php-cart/totals/js/gift-wrapping-js.phtmlHyva_MagentoGiftCard::cart/giftcard/js/giftcard-total-js.phtmlandphp-cart/giftcard/js/giftcard-total-js.phtmlHyva_MagentoReward::totals/js/rewards-js.phtml
Form validation rules consolidated into the base Hyvä Theme module
The custom form validation rules that previously lived in Hyva_Enterprise have been moved into the base Hyva_Theme
module, removing duplicated code. The JavaScript rules themselves (dateFromTo, minMax, file-type, file-max-size,
image-max-dimensions, url, etc.) are unchanged and still registered via the same
advanced JavaScript form validation
API - only their location has changed.
Backwards compatibility
Any theme or module that referenced the Hyva_Enterprise::form/*-validation.phtml templates or their named layout
blocks (date.validation, file.upload.validation, additional.input.validation, min.max.validation) must
repoint to the Hyva_Theme equivalents. The Hyva_MagentoRma and Hyva_MagentoCustomerCustomAttributes modules
already consume the rules from Hyva_Theme.
Magento helpers migrated to Hyvä View Models
Templates that called Magento core helpers directly ($this->helper(...)) have been migrated to dedicated Hyvä View
Models, the recommended Hyvä pattern.
Hyva_MagentoReward- New View Model
\Hyva\MagentoReward\ViewModel\Reward(extends\Magento\Reward\Helper\Data) - The
customer/reward/info.phtmlandtooltip.phtmltemplates now use it instead of$this->helper(\Magento\Reward\Helper\Data::class)
- New View Model
Hyva_MagentoRma- New View Model
\Hyva\MagentoRma\ViewModel\RmaTracking(getTrackingPopupUrlBySalesModel()), and\Hyva\MagentoRma\ViewModel\CreateRmagained a new public methodgetReturnCreateUrl(Order $order) - The
order/button.phtmlandreturn/tracking.phtmltemplates now use these View Models instead of\Magento\Rma\Helper\Data
- New View Model
Hyva_MagentoAdvancedCheckoutcart/item/failed.phtmlnow uses\Hyva\Theme\ViewModel\ProductPrice(displayPriceIncludingTax(),getPriceValueInclTax(),getPriceValueExclTax(),getPriceDisplayType()) instead of\Magento\Tax\Helper\Dataand\Magento\Catalog\Helper\Data
Backwards compatibility
Child themes overriding any of these templates that relied on the old $helper / $this->helper(...) variables
must be updated to use the View Models. \Hyva\MagentoRma\ViewModel\CreateRma now requires
\Magento\Framework\UrlInterface and \Magento\Customer\Model\Session constructor arguments, so any di.xml
override or subclass must supply them.
Gift Card price component refactored
Hyva_MagentoGiftCard previously generated a uniquely-named inline Alpine component (initPrice<productId>()) inside
product/price-giftcard.phtml for every gift-card price box on the page. This is replaced with a single shared,
data-attribute driven component.
- New template
Hyva_MagentoGiftCard::js/gift-card-price.phtmldefines a single sharedinitGiftCardPricecomponent, registered intobefore.body.endas thegiftcard.price.jsblock (seehyva_catalog_product_view_type_giftcard.xml). product/price-giftcard.phtmlno longer emits an inline<script>; its root element now usesx-data="initGiftCardPrice"and passes state viadata-*attributes (data-product-id,data-display-tax,data-initial-final-price,data-initial-tier-prices,data-regular-price,data-is-saleable).- This prevents duplicate component definitions when multiple gift-card price boxes render. The window event contract is preserved (
update-prices-<productId>,update-qty-<productId>,update-custom-option-active,update-custom-option-pricesin;update-product-final-priceout).
Backwards compatibility
Custom code that referenced the old per-product initPrice<productId> component will break and must be updated to
the shared initGiftCardPrice component.
Bug fixes
Hyva_MagentoMultipleWishlist- wishlist item prices did not render when multiple wishlists were disabled (multiple_enabled=0, the default). The price-render block inhyva_wishlist_index_index.xmlwas renamed tomultiple.product.price.render.wishlist(withas="product.price.render.wishlist") to avoid a block-name collision with the baseMagento_Wishlisthandle.- Backwards compatibility: layout customisations that targeted this block by name (
referenceBlock name="product.price.render.wishlist") in the multiple-wishlist context should use the new block name. Theasalias preserves the template-level lookup, so most overrides are unaffected.
- Backwards compatibility: layout customisations that targeted this block by name (
Hyva_MagentoCatalogEvent- the placeholder image fallback incatalog/event/item/renderer.phtmlnow resolves via$block->getViewFileUrl(...)instead of$this->getViewFileUrl(...).Hyva_MagentoGiftCard- removed a strayecho 'product not found';debug output that printed on the page when no saleable product was found; corrected escapers (escapeJs()for JS-context strings,escapeHtml()for<label>text).Hyva_MagentoReward- correctedtitleattribute escaping toescapeHtmlAttr()incustomer/reward/subscription.phtml.Hyva_MagentoRma- the Return button (order/button.phtml) is now gated byifconfig="sales/magento_rma/enabled"across all sales/RMA order layouts, so it is hidden when RMA is disabled. Guest-returns "Return" URLs now route correctly tomagento_rma/guest/createfor guests vsmagento_rma/returns/createfor logged-in customers (via the newCreateRma::getReturnCreateUrl()).
Admin theme and branding
- New compile-time LESS pre-processor plugin (
\Hyva\Enterprise\Plugin\AdminThemeLessVariableOverrides, registered viadi.xml) injects LESS variable overrides into theHyva/commerceadmin theme, overriding the primary brand colour to Hyvä purple (@hyva-purpleand its lighter/darker shades). - New admin configuration tab "Hyvä Enterprise" (
hyva_commerce,src/etc/adminhtml/system.xml) with the Enterprise logo applied viasrc/view/adminhtml/web/css/source/_module.less. - New branding assets:
favicon.ico,hyva-enterprise-login.svg,hyva-enterprise-logo.svgand a newhyva-enterprise-squircle.svglogo variant.
Backwards compatibility
Hyva_Enterprise now declares a hard sequence dependency on Hyva_Commerce in module.xml.
Deprecated code removed
Hyva_Enterprise
The form-validation layouts and templates were removed (now provided by Hyva_Theme).
Layout files
Hyva_Enterprise::hyva_form_validation_date.xmlHyva_Enterprise::hyva_form_validation_files.xmlHyva_Enterprise::hyva_form_validation_input_additional.xmlHyva_Enterprise::hyva_form_validation_min_max.xml
Template files
Hyva_Enterprise::form/date-validation.phtmlHyva_Enterprise::form/file-validation.phtmlHyva_Enterprise::form/input-additional-validation.phtmlHyva_Enterprise::form/min-max-validation.phtml
Hyva_MagentoGiftCard
The per-product inline initPrice<productId> Alpine component and its inline <script> in
product/price-giftcard.phtml were removed in favour of the shared js/gift-card-price.phtml component (see above).
Translated phrases
A number of additional translated phrases were added to Hyva_Enterprise (src/i18n/en_US.csv), covering Adobe
Commerce features (Gift Wrapping, Wish Lists, Reward Points, RMA/shipment tracking) and Hyvä-specific configuration
notes.
Hyvä only supports the native input date type format
If empty, we'll automatically set the width value in pixels (not used in Hyvä Themes).
Number of Items to display at once (not used in Hyvä Themes).
Number of Items to scroll per click (not used in Hyvä Themes).
Create Wishlist
Rename Wish List
Wishlist Name
Select a Wish List:
The wishlist could not be found.
You have no items in this wishlist.
Gift Wrapping for Items
Gift Wrapping for Order
Gift Wrapping:
Gift Receipt:
Printed Card:
My Reward Points
Earn %1 for purchases your invitees make.
Send this invitation now and earn %1 when your invitee signs up on our site.
You can reward up to %1 invitee purchase(s).
You can reward up to %1 invitee registration(s).
Invalid form key. Please refresh the page and try again.
We could not add the items to shopping cart.
No banners found
Sale Events
Tracking Carrier
Tracking number
Changelogs
The changelog is available here.
Tooling
Please refer to the Hyvä Enterprise upgrade docs for helpful information on how to upgrade.
Known Issues
Please check the GitLab issue tracker for known issues.