After upgrading to Magento 2.4.x, the Magenerds Baseprice extension may no longer work correctly: base prices no longer update when customers select options on the storefront. The following changes to the file /vendor/magenerds/baseprice/view/frontend/templates/configurable/afterprice.phtml may resolve the issue:
|
1 2 3 4 5 |
//aus require(['jquery', 'jquery/ui', 'domReady!'], function($) { // will be applied require(['jquery', 'jquery/ui', 'domReady!', 'Magento_Swatches/js/swatch-renderer'], function($) { |
|
1 2 3 4 5 6 7 |
//aus swatchWidget.element.find('.' + swatchWidget.options.classes.attributeClass + '[option-selected]').each(function () { options[$(this).attr('attribute-id')] = $(this).attr('option-selected'); // will be applied swatchWidget.element.find('.' + swatchWidget.options.classes.attributeClass + '[data-option-selected]').each(function () { options[$(this).data('attribute-id')] = $(this).attr('data-option-selected'); |
The…