Table of Contents & Menu
Navigation

Upgrading to 1.3.6

Release 1.3.6 includes performance improvements, bug fixes, features, and improved accessibility.

When upgrading the Hyvä Theme to 1.3.6, always update the hyva-themes/magento2-theme-module to its latest version as well.

It's safe to update the Hyva_Theme module (package hyva-themes/magento2-theme-module) to the latest version, even if you're not upgrading the Default Theme to 1.3.6.

Notable News

TailwindCSS version 3.4.1

This release upgrades TailwindCSS to version 3.4.1, which now requires Node.js version 16 or newer.

Requiring JavaScript Dependencies

You can now declare JavaScript dependencies at the template or block level. If the template or block renders, the required JS will be added to the before.body.end container. This helps reduce duplicate JavaScript on product listings. Refer to the documentation for more information.

Reduced Unused or Duplicated JavaScript

To improve Core Web Vitals, duplicate and unnecessary scripts have been removed. PageBuilder content type JavaScript now renders only when its content type is present on the page. Additionally, the initPriceBox function renders once per product listing, not once per product.

hyva.activateScripts Method

The hyva.activateScripts method takes an Element instance, extracts all script child elements, and adds them to the document head for browser parsing. Refer to the window.hyva documentation for more information.

Security: Form Key Now Required for Customer AJAX Login

A form key is now required for customer AJAX logins on Hyvä sites. This addresses a security vulnerability where Magento previously didn't require a form key for AJAX logins (used when 'Checkout as Guest' is disabled).

Default Customer Section Data

Visitors without a session will now use default private section data. This saves an AJAX request for each visitor, reducing server load. We expect this to work without issues in most cases. For more information, refer to the documentation on how to configure the default section data.

The search_recommendations and search_suggestions blocks above the search_result_list on the search results page may need styling after upgrading.

Backward Incompatible Changes

Node.js Version 16

This release upgrades TailwindCSS to version 3.4.1, which requires Node.js version 16 or newer. Ensure you upgrade Node.js before upgrading hyva-themes/magento2-default-theme to 1.3.6.

Mini-Cart Extra Actions Block Changed to Container

The extra_actions block in the mini-cart, typically used for payment method options, is now a container and renders with JavaScript from private content data. Previously, Hyvä rendered this block directly with PHP, which prevented its use with customer/quote-dependent actions (e.g., PayPal Express In-Context). This change aligns with Magento's default behavior to avoid caching customer-specific data.

The impact varies based on extensions and customizations. Verify mini-cart extra action buttons after upgrading.

Order History Ship-To Name

The 'Ship-To' column in customer order history and recent orders now displays the shipping address customer name instead of the billing address company name. This change better suits B2C use cases, as the company name was often empty for most orders.

For B2B shops needing the previous behavior, override the Magento_Sales::order/history.phtml and Magento_Sales::order/recent.phtml templates to use:

<?= $order->getBillingAddress() ? $escaper->escapeHtml($order->getBillingAddress()->getCompany()) : '&nbsp;' ?>

New Translated Phrases

The following new phrases were added to the translation dictionary:

%1 item
%1 search results
%1 thumbnail
1 search result
Close panel
Configure %1 on the product page
Error initializing Express Checkout, please try again later or choose a different checkout method.
Play video
The price depends on the chosen options
The price depends on the options chosen on the product page

Support for Demo Store, Disabled JS, and Missing Browser Storage Notices

Hyvä now supports displaying demo store, disabled JS, and missing browser storage notices, even if previously hidden. If the 'Display Demo Store Notice' (Content > Design > Configuration > [Your Theme]) was accidentally enabled, it might appear after upgrading. Ensure it's set to 'No' before upgrading if you don't want it.

"This is a demo store. No orders will be fulfilled"

Support for Video Settings from Admin Config

The default behavior of the gallery option loopVideo has changed from true to false, meaning videos no longer loop automatically by default. The admin configuration now takes precedence. To ensure videos loop automatically, set loopVideo to true in your admin configuration at "Stores > Configuration > Catalog > Catalog > Product Video".

Anonymized Default Section Data for Visitors Without a Session

For performance, visitors without a session now receive anonymized default section data without an AJAX request. While this is a potentially backward-incompatible change, we expect minimal impact on extensions.

If an extension's frontend code relies on fully populated section data, you might need to configure default values in etc/frontend/di.xml. For example, to prevent the directory-data section from being emptied and to set an empty items array for the wishlist section:

<type name="Hyva\Theme\ViewModel\CustomerSectionData">
    <arguments>
        <argument name="defaultSectionDataKeys" xsi:type="array">
            <item name="directory-data" xsi:type="boolean">true</item>
            <item name="wishlist" xsi:type="string">{"items": []}</item>
        </argument>
    </arguments>
</type>

All other sections not explicitly listed will be set to an empty array.

New Constructor Argument for \Hyva\Theme\ViewModel\ProductList

The \Hyva\Theme\ViewModel\ProductList class now has a new mandatory constructor argument: \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig. If you are extending this class, your derivative class's parent constructor call must be updated accordingly.

Changelogs

Changelogs are available from the CHANGELOG.md in the codebase, or here:

Tooling

Refer to the Hyvä Theme upgrade docs for helpful information on how to upgrade.