Hyvä ElasticSuite Compat
Fixes for hyva-themes/magento2-smile-elasticsuite running on Hyvä 1.5+.
Category listing swatches
Section titled “Category listing swatches”Hyva_SmileElasticsuite (up to and including 1.2.8) overrides the configurable
renderer on category pages (category.product.type.details.renderers.configurable)
with Hyva_SmileElasticsuite::swatch/product/listing/renderer.phtml. That template
is a copy of the pre-1.5 Hyvä renderer: it renders product.swatch.item inside an
Alpine x-for and never sets option on the block. Hyvä 1.5’s swatch-item.phtml
throws on that:
RuntimeException: product.swatch.item rendered without "option" dataso every category containing a configurable product fails to render.
This module points the block back at the Hyvä 1.5 template
(Magento_Swatches::product/listing/renderer.phtml). The Elasticsuite swatches
helper is injected through Hyva_SmileElasticsuite’s di.xml, which stays in
effect.
Remove this module once a hyva-themes/magento2-smile-elasticsuite release
ships a 1.5-compatible listing renderer.
Requirements
Section titled “Requirements”| Magento Open Source | 2.4.8 |
| Hyvä Theme | 1.5 or newer |
hyva-themes/magento2-smile-elasticsuite |
1.2 – 1.2.8 |
| PHP | 8.3 – 8.4 |
The module is a single layout file: no PHP classes, no database tables, no settings.
Installation
Section titled “Installation”composer require slova/module-hyva-elasticsuite-compatbin/magento module:enable Slova_HyvaElasticsuiteCompatbin/magento setup:upgradebin/magento cache:flushOpen a category with a configurable product: it renders, with its swatches.
Uninstalling
Section titled “Uninstalling”When the Hyvä ElasticSuite module ships its own fix:
bin/magento module:disable Slova_HyvaElasticsuiteCompatcomposer remove slova/module-hyva-elasticsuite-compatbin/magento setup:upgradebin/magento cache:flushLicense
Section titled “License”MIT, see LICENSE.