Got a strange scenario where getting plus prices showing in configurable dropdown.

These are simples associated to a configurable product.

enter image description here

Not seeing anywhere where these plus prices are defined. Reverted to default template just to make sure not templating issue.

Confirmed correct price coming through on basket.

These are not the configuration prices.

enter image description here

Where are these prices plus (+) prices coming from?

有帮助吗?

解决方案

This is a bug introduced in https://github.com/magento/magento2/pull/17695

And fixed in https://github.com/magento/magento2/pull/22535

In our case just removed the

                        if (typeof allowedProducts[0] !== 'undefined' &&
                            typeof optionPrices[allowedProducts[0]] !== 'undefined') {
                            allowedProductMinPrice = this._getAllowedProductWithMinPrice(allowedProducts);
                            optionFinalPrice = parseFloat(optionPrices[allowedProductMinPrice].finalPrice.amount);
                            optionPriceDiff = optionFinalPrice - finalPrice;

                            if (optionPriceDiff !== 0) {
                                options[i].label = options[i].label + ' ' + priceUtils.formatPrice(
                                    optionPriceDiff,
                                    this.options.priceFormat,
                                    true);
                            }
                        }

in theme override

/app/design/frontend/Xigen/Theme/Magento_ConfigurableProduct/web/js/configurable.js

许可以下: CC-BY-SA归因
scroll top