Closed
Description
Preconditions
Magento version 2.0.6 CE
Steps to reproduce
- Create a configurable product with options that, when selected, can change the final price.
- Set upsell/crossell/related products on this configurable product. The idea is to get several elements on the page that have the class 'priceBox'.
- Navigate to that product on the frontend and review all the prices on the page.
- Select the configurable option that will change the final price.
- Notice how not just the product price changed but the prices of all other products on the page as well.
Expected result
Only the price of the product being viewed should be changed.
Actual result
All prices contained in an element with the class 'priceBox' are changed.
Proposed solution
File: app/code/Magento/ConfigurableProduct/view/frontend/web/js/configurable.js
Line: 21
Change To: priceHolderSelector: '.product-info-main .price-box',
This should work because on line 415 the updatePrice event will only be triggered on the priceBox in the product-info-details element on the page rather than every priceBox on the page.