-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: ConfigurableProductComponent: CssFixed in 2.4.xThe issue has been fixed in 2.4-develop branchThe issue has been fixed in 2.4-develop branchIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P2A defect with this priority could have functionality issues which are not to expectations.A defect with this priority could have functionality issues which are not to expectations.Progress: doneReported on 2.4.0Indicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branchSeverity: S2Major restrictions or short-term circumventions are required until a fix is available.Major restrictions or short-term circumventions are required until a fix is available.Triage: DoneHas been reviewed and prioritized during Triage with Product ManagersHas been reviewed and prioritized during Triage with Product Managers
Description
Preconditions (*)
Magento 2.4
Steps to reproduce (*)
- Create a configurable product and associate 1 simple product with no tier pricing and 1 simple product with tier pricing
- Style the tier prices block with a background or border (for example
border: aqua; background: #99cfff;
) - Toggle between the 2 simple products. For the product with no tier pricing, the content disappears but the CSS styling remains (e.g. in Magento Blank theme, there is an empty box with a gray background).
Expected result (*)
- The tier price block, including associated CSS, should disappear from the frontend when choosing a simple product that doesn't have tier prices.
Actual result (*)
- The tier price block, including CSS styling such as background or border, is visible even when there are no tier prices to display.
Additional information
Even when there are no tier prices, any CSS applied to tier prices block are visible on the frontend.
A simple edit to _displayTierPriceBlock function in configurable.js can fix this problem.
Solution:
in _displayTierPriceBlock function of configurable.js, change the following if statement:
if (typeof optionId != 'undefined' &&
this.options.spConfig.optionPrices[optionId].tierPrices != [] // eslint-disable-line eqeqeq
)
to the following, which includes a check for tier prices array with 0 length:
if (typeof optionId != 'undefined' &&
this.options.spConfig.optionPrices[optionId].tierPrices != [] && // eslint-disable-line eqeqeq
this.options.spConfig.optionPrices[optionId].tierPrices.length > 0
)
- [S4 ] Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Labels
Component: ConfigurableProductComponent: CssFixed in 2.4.xThe issue has been fixed in 2.4-develop branchThe issue has been fixed in 2.4-develop branchIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P2A defect with this priority could have functionality issues which are not to expectations.A defect with this priority could have functionality issues which are not to expectations.Progress: doneReported on 2.4.0Indicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branchSeverity: S2Major restrictions or short-term circumventions are required until a fix is available.Major restrictions or short-term circumventions are required until a fix is available.Triage: DoneHas been reviewed and prioritized during Triage with Product ManagersHas been reviewed and prioritized during Triage with Product Managers
Type
Projects
Status
Done