Skip to content

Configurable product price changes affect all elements with the class 'priceBox' #5798

Closed
@ntoombs19

Description

@ntoombs19

Preconditions

Magento version 2.0.6 CE

Steps to reproduce

  1. Create a configurable product with options that, when selected, can change the final price.
  2. Set upsell/crossell/related products on this configurable product. The idea is to get several elements on the page that have the class 'priceBox'.
  3. Navigate to that product on the frontend and review all the prices on the page.
  4. Select the configurable option that will change the final price.
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions