5

I am using magento-2.2.3. and showing prices including tax on product list page.

Now the issue is the price filter in layered navigation is considering prices excluding tax. So how to change the layered navigation logic for that?

I am using custom third-party extension for layered navigation, but the same issue also exists with the extension disabled.

This issue has been fixed in later magento versions, but due to some constraints, i cnt go with version upgrade.

For better understanding, check this screenshot.

enter image description here

When i set price to filter between 90-100, the products whose price including tax is 103 (i.e. > 100) are also shown in the result. the price in the layered navigation is not considering price including tax

Can anyone tell me how to implement the solution ?

Thanks in advance.

3
  • can u share code
    – Rv Singh
    Sep 21, 2018 at 13:34
  • @sania - i haven't customized anything.!! Sep 21, 2018 at 13:38
  • any luck on this?
    – Devidas
    May 20, 2021 at 8:46

1 Answer 1

0

This issue exists in Magento, For more information.

rewrite this file.

<Vendor>/<Module>/Model/ResourceModel/Product/Indexer/Price/Configurable.php

protected function _applyConfigurableOption()
...
        $select->columns(
            [
                'min_price' => new \Zend_Db_Expr('io.min_price'),
                'max_price' => new \Zend_Db_Expr('io.max_price'),
                'tier_price' => 'io.tier_price',
                /*'min_price' => new \Zend_Db_Expr('i.min_price - i.orig_price + io.min_price'),
                'max_price' => new \Zend_Db_Expr('i.max_price - i.orig_price + io.max_price'),
                'tier_price' => 'io.tier_price',*/
            ]
        );
...

For more information, please see #7367

1
  • Thanks for your input. But i am not using configurable products. These are simple products with custom options Sep 26, 2018 at 6:59

Your Answer

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

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