Skip to content

Range label for 'Layer\Filter\Decimals' is using priceCurrency->format #16453

@roobware

Description

@roobware

The decimal filter is using the currency formatter.
Is this so planed or a bug?

This two files are affected:
vendor/magento/module-catalog/Model/Layer/Filter/Decimal.php ->_renderItemLabel()
vendor/magento/module-catalog-search/Model/Layer/Filter/Decimal.php -> renderRangeLabel()

catalog_filter_decimal

catalogsearch_filter_decimal

I think these filters should not use the currency formatter and it should be possible to define the unit of value in the eav table for the label :)

Preconditions

Debian 9.4
Apache 2.4
PHP 7.1
MySQL 5.7
Magento 2.2.5

Steps to reproduce

Default standard installation.
Add a new eav attribute programmatically with data type 'decimal'.

Expected result

Price filter should generate range labels with numbers only:

  • 0 - 9
  • 10 - 19
  • 20 and above.......

Actual result

  • 0,00 € - 9,00 €
  • 10,00 € - 9,00 €
  • 20,00 € - -0,01 €

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: CatalogComponent: CatalogIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S2Major restrictions or short-term circumventions are required until a fix is available.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions