Table of Contents & Menu
Navigation

Upgrading to 1.3.17

Release 1.3.17 addresses a critical bug in the CSP Theme.

When upgrading to Hyvä Theme 1.3.17, **always update the hyva-themes/magento2-theme-module package to its latest version.** This module update is safe even if you are not updating the Default Theme itself.

Bug Fix Details

Wrong old price calculation on the product detail page in the CSP Theme

This release fixes an issue where the old price on the product detail page was rendered incorrectly. This was due to incompatible JavaScript calculations involving mixed input types.

Apply this fix manually (without full theme update)

To apply this fix without updating the entire theme, modify your theme's Magento_Catalog/templates/product/view/price.phtml file as follows:

diff --git a/Magento_Catalog/templates/product/view/price.phtml b/Magento_Catalog/templates/product/view/price.phtml
index 454bf69885cbdd00ba6dfb004f4bf55463293c4e..8ffc0ab5ab88237578b41d53ae1a92249d89f9 100644
--- a/Magento_Catalog/templates/product/view/price.phtml
+++ b/Magento_Catalog/templates/product/view/price.phtml
@@ -250,10 +250,12 @@ if ($msrpPrice = iterator_to_array($product->getPriceInfo()->getPrices())[MsrpPr
                    this.activeProductsPriceData[this.finalPriceKey].amount < this.activeProductsPriceData[this.regularPriceKey].amount;
            },
            formatOldPriceWithOptions() {
-                return hyva.formatPrice(this.$el.dataset.oldPrice + this.getCustomOptionPrice());
+                const price = parseFloat(this.$el.dataset.oldPrice);
+                return hyva.formatPrice(price + this.getCustomOptionPrice());
            },
            formatOldPriceExclWithOptions() {
-                return hyva.formatPrice(this.$el.dataset.oldPriceExcl + this.getCustomOptionBasePrice())
+                const price = parseFloat(this.$el.dataset.oldPriceExcl);
+                return hyva.formatPrice(price + this.getCustomOptionBasePrice())
            },
            formatOldPriceInclWithSelection() {
                return hyva.formatPrice(this.activeProductsPriceData[this.regularPriceKey].amount + this.getCustomOptionPrice());

Changelogs

For full details on bug fixes, refer to the CHANGELOG.md in the codebase or use these links:

Upgrade Resources

Refer to the Hyvä Theme upgrade documentation for general upgrade guidance.