Magento2: Price sorting order should NOT consider out-of-stock or disabled child products for minimal price.

Created on 13 Oct 2017  路  7Comments  路  Source: magento/magento2

Preconditions
2.1.9

Steps to reproduce

(1) Create a configurable product with below child products
- color-blue, price: $20 , qty : 10, in-stock
- color-red, price: $10 , qty : 10, out-of-stock

(2) Create a simple product with price $15.

Expected result
Sort order should be (2) and then (1).

Actual result
Sort order is (1) and then (2)

Even if the child product is out-of-stock it still considers its price while sorting

Fixed in 2.3.x Clear Description Confirmed Format is valid Reproduced on 2.1.x Reproduced on 2.2.x

Most helpful comment

This is the relevant commit https://github.com/magento/magento2/commit/8c9f80bc6d2a2c83719b3eedbd519cbe73fcf168

You will need to add also some classes the above commit is relying on from other PRs.

Below is a complete patch tested on 2.2.3 (no guarantee it will work for you).

Good luck.

Exclude_out_of_stock_products_from_configurable_index_final_price.patch.txt

All 7 comments

@magento-engcom-team any news on this issue?

@magento-engcom-team can you please share commit link ?

@magento-engcom-team

Please share the commit link. It'll be helpful for us till Magneto releases 2.3 with this fix.

@magento-engcom-team can you please share commit link or a fix as alternative?

@magento-engcom-team can you please share commit link or a fix as alternative?

@magento-engcom-team can you please share commit link or a fix as alternative?

This is the relevant commit https://github.com/magento/magento2/commit/8c9f80bc6d2a2c83719b3eedbd519cbe73fcf168

You will need to add also some classes the above commit is relying on from other PRs.

Below is a complete patch tested on 2.2.3 (no guarantee it will work for you).

Good luck.

Exclude_out_of_stock_products_from_configurable_index_final_price.patch.txt

Was this page helpful?
0 / 5 - 0 ratings