GithubHelp home page GithubHelp logo

dabeedj / configurable-child-visibility Goto Github PK

View Code? Open in Web Editor NEW

This project forked from interjar/configurable-child-visibility

0.0 0.0 0.0 45 KB

Magento 2.x Extension to Fix a few issues surrounding Configurable child products visibility when out of stock

PHP 100.00%

configurable-child-visibility's Introduction

Interjar ConfigurableChildVisibility

Magento 2.x Extension to Fix a few issues surrounding Configurable child products visibility when out of stock.

Various Related Core Issues:

Possibly some more too..

dabeedj: Added quantities info for storefront

Whats it all about?

So, in Magento we have an option in config:

Stores > Configuration > Catalog > Inventory > Display Out Of Stock Products (Y/N)

This implies that we'll get to see any out of stock products at any point where we would expect. For a lot of people - me included, it implies we'd get to see child options etc.

Unfortunately its not the case. There are quite a few places where products are removed from various collections due to the stock_status value.

In this extension I've attempted to stop this from happening if the aforementioned configuration is set to Yes.

Note

This is really temporary solution, we're hoping to get the issues fixed in the core following conversations with various developers/maintainers/contributors. The problem with this is that its a case of, is this a Bug or a Feature?

If you would like to show options/swatches even if all children are out of stock you need to make a template change, you need to remove the $product->isSalable() checks from the Magento_Catalog::product/view/form.phtml template

Installation

  • Add the module to composer:

      composer require dabeedj/module-configurable-child-visibility
    
  • Enable the module:

      bin/magento module:enable Interjar_ConfigurableChildVisibility
    
  • Deploy static content and compile DI:

      bin/magento setup:static-content:deploy
      bin/magento setup:di:compile
    
  • Clear cache

Support

If you have any issues with this extension, open an issue on GitHub.

Contribution

Any contribution is highly appreciated. The best way to contribute code is to open a pull request on GitHub.

License

OSL - Open Software Licence 3.0

Copyright

© 2018 Interjar Ltd

configurable-child-visibility's People

Contributors

dabeedj avatar adamj88 avatar josh-carter avatar stevie-ray avatar pifpafka avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.