pkarsai / show-out-of-stock-products-magento2

This module makes Magento 2 display out-of-stock configurations for configurable products when the relevant option is set to Yes in the back end.
MIT License
13 stars 8 forks source link

Getting error when upgraded Magento to 2.3.6 - Missed required argument stockConfig in parent::__construct call #6

Open VivekShingala opened 3 years ago

VivekShingala commented 3 years ago

Hi there

We have migrated our Magento store to 2.3.6 but facing below error at the time of compilation.

Interception cache generation... 6/8 [=====================>------]  75% 35 secs 388.0 MiBErrors during compilation:
    Myweb\ShowOutOfStockProducts\Plugin\InStockOptionSelectorPlugin
        Missed required argument stockConfig in parent::__construct call. File: /app/code/Myweb/ShowOutOfStockProducts/Plugin/InStockOptionSelectorPlugin.php
Total Errors Count: 1

In Log.php line 92:

  Error during compilation  
Nana-Kow commented 3 years ago

This looks like avery important extention, my am afried it doesn't work on 2.3.6. I just a white page on the home page. Really wish there could be help. I think Vivek designed this just for 2.2.

Any help will be appreciated.

VivekShingala commented 3 years ago

Hi @Nana-Kow

I fixed it by passing $stockConfiguration as the second parameter inside construct method in InStockOptionSelectorPlugin.php file for parent::construct call.

parent::__construct($stockStatusResource, $stockConfiguration);

hiuryanderson commented 2 years ago

Working for me. Thanks