0

I want to round off the price range values in the layered navigation. Now it is showing as below

$40.00 - $49.99
$50.00 - $59.99
$60.00 - $69.99
$70.00 - $79.99
$90.00 and above

enter image description here

I want the following format.

$40.00 - $50
$51.00 - $60
$61 - $70
$71 - $90
$91.00 and above

How can I do it?

I am using magento 2.3.2. I have configured the Price Navigation Step Calculation field as "Automatic (equalize price ranges)".

Please help me to resolve this

3
  • I'm having the same problem. Let me know if you find the solution.
    – Nayem323
    Commented Aug 30, 2019 at 3:50
  • @Nayem Please override the class Magento\CatalogSearch\Model\Layer\Filter\Price Commented Aug 30, 2019 at 8:00
  • could you please tell which code to override?
    – Nayem323
    Commented Aug 30, 2019 at 9:52

2 Answers 2

0

I have override the _renderRangeLabel function in the class

Magento\CatalogSearch\Model\Layer\Filter\Price.php.
-1

You just need to set below configuration

Stores > Configuration > Catalog > Catalog > Layered navigation > price navigation step calculation

enter image description here

I hope this settings help of you.

1
  • I have tried this. But it is not round off the values Commented Aug 26, 2019 at 3:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.