Skip to content

Display zero tax configuration does not work in case of multiple shipping methods on Cart page #35561

@pranayhbwsl

Description

@pranayhbwsl

Preconditions and environment

  • Magento version 2.4.2

Steps to reproduce

  1. Enable multiple delivery methods by navigating to Stores -> Configuration -> Sales -> Delivery Methods.
  2. Set 'Display Zero Tax Subtotal' to 'No' by navigating to Stores -> Configuration -> Sales -> Tax -> Shopping Cart Display Settings.
  3. Visit storefront without signing in, add a product to cart and check shopping cart. Zero tax field is visible untill we chose a shipping method.

Expected result

Tax field with value 0.00 should not be visible in cart totals before selecting shipping methods.

Screenshot from 2022-06-01 10-53-33

Actual result

Tax field with value 0.00 is visible even before selecting shipping method.
Screenshot from 2022-06-01 10-51-42

Additional information

This issue happens because of strict equals operator in -> vendor/magento/module-tax/view/frontend/web/js/view/checkout/cart/totals/tax.js on line 24.

If we change it '==' the value '0.00' will also satisfy this condition and hide the tax field.

Same operator i.e., '==' is used in vendor/magento/module-tax/view/frontend/web/js/view/checkout/summary/tax.js for tax field zero value display check.

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

Labels

Area: Cart & CheckoutArea: TaxComponent: TaxIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P3May be fixed according to the position in the backlog.Progress: doneReported on 2.4.2Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions