magento2: Configurable product price is not displayed if all children are out of stock and even if Display Out of Stock Products is set to "yes"

Preconditions

  1. Magento CE 2.2.2 with Sample Data
  2. PHP 7.0

Steps to reproduce

  1. Create configurable product with view simples
  2. Make configurable and all simple products out of stock
  3. Set Display Out of Stock Products to β€œyes”

Expected result

  1. Price for configurable product should be displayed

Actual result

  1. Price is not displayed at all

Seems like in \Magento\ConfigurableProduct\Model\ResourceModel\Product\StockStatusBaseSelectProcessor::process() there is incorrect condition. It should be: if (!$this->stockConfig->isShowOutOfStock()) {

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 11
  • Comments: 15 (6 by maintainers)

Commits related to this issue

Most upvoted comments

I just created a small module to show the price of out-of-stock items based on this answer at stackexchange. Feel free to fork: https://github.com/nordcomputer/magento2-showoutofstockprice

Composer install should work, if you add the repo to your dependencies. Be aware, that I set the required php version to β€œ^7.1” - you may need to reconfigure that in the cmposer.json file, if you use another version.

Sorry @nordcomputer, I reindex and fix all, Many Thanks.

I am working on this #mm18id