Giter Club home page Giter Club logo

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..

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 interjar/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

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

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

configurable-child-visibility's Issues

Php compatibilty

Hi,

Any release planned for php 7.2?

[InvalidArgumentException]
Package interjar/module-configurable-child-visibility at version has a PHP requirement incompatible with your PHP version (7.2.24)

Thank you,
Damien.

Compile Error in 2.1.9

We were hoping to use this module in a Magento 2.1.9 install and when we did a di:compile the following error:

Fatal error: Class 'Magento\ConfigurableProduct\Plugin\Model\ResourceModel\Attribute\InStockOptionSelectBuilder' not found in /var/www/vhosts/abc.do300.com/app/code/Interjar/ConfigurableChildVisibility/Plugin/Model/ResourceModel/Attribute/InStockOptionSelectBuilder.php on line 17

Since the core Magento plugin this is based on isn't in 2.1.9. Is this needed for 2.1.9? Or is this module not compatible with 2.1.9?

Any direction would be very helpful!

Thank you,

Kevin

Errors during compilation (v1.0.0)

Errors during compilation:
Interjar\ConfigurableChildVisibility\Plugin\Model\ResourceModel\Attribute\
InStockOptionSelectBuilder
Extra parameters passed to parent construct: $stockConfiguration.

Child Out of stock

I use this module it works but the user can click on the option. I want to make it none clickable is this something that is possible with this module I am new to Magento any guidelines will be highly appreciated.

Cannot install on community 2.3.1

I tried to install on community 2.3.1 using composer and get these errors:

Problem 1 - Conclusion: remove magento/product-community-edition 2.3.1 - Conclusion: don't install magento/product-community-edition 2.3.1 - Installation request for interjar/module-configurable-child-visibility ^0.6.2 -> satisfiable by interjar/module-configurable- child-visibility[0.6.2]. - Installation request for magento/product-community-edition 2.3.1 -> satisfiable by magento/product-community-edition[2.3.1]. - magento/product-community-edition 2.3.1 requires magento/framework 102.0.1 -> satisfiable by magento/framework[102.0.1]. - Can only install one of: magento/framework[101.0.0, 102.0.1]. - Can only install one of: magento/framework[102.0.1, 101.0.0]. - Can only install one of: magento/framework[102.0.1, 101.0.0]. - interjar/module-configurable-child-visibility 0.6.2 requires magento/framework 101.* -> satisfiable by magento/framework[101. 0.0, 101.0.1, 101.0.2, 101.0.3, 101.0.4, 101.0.5, 101.0.6, 101.0.7, 101.0.8]. - magento/framework 101.0.1 requires colinmollenhour/php-redis-session-abstract 1.3.4 -> satisfiable by colinmollenhour/php-red is-session-abstract[v1.3.4]. - magento/framework 101.0.2 requires colinmollenhour/php-redis-session-abstract 1.3.4 -> satisfiable by colinmollenhour/php-red is-session-abstract[v1.3.4]. - magento/framework 101.0.3 requires colinmollenhour/php-redis-session-abstract 1.3.4 -> satisfiable by colinmollenhour/php-red is-session-abstract[v1.3.4]. - magento/framework 101.0.4 requires colinmollenhour/php-redis-session-abstract 1.3.4 -> satisfiable by colinmollenhour/php-red is-session-abstract[v1.3.4]. - magento/framework 101.0.5 requires colinmollenhour/php-redis-session-abstract 1.3.4 -> satisfiable by colinmollenhour/php-red is-session-abstract[v1.3.4]. - magento/framework 101.0.6 requires colinmollenhour/php-redis-session-abstract 1.3.4 -> satisfiable by colinmollenhour/php-red is-session-abstract[v1.3.4]. - magento/framework 101.0.7 requires colinmollenhour/php-redis-session-abstract 1.3.4 -> satisfiable by colinmollenhour/php-red is-session-abstract[v1.3.4]. - magento/framework 101.0.8 requires colinmollenhour/php-redis-session-abstract 1.3.4 -> satisfiable by colinmollenhour/php-red is-session-abstract[v1.3.4]. - Conclusion: don't install colinmollenhour/php-redis-session-abstract v1.3.4
Any ideas? thanks.

Making non-clickable out of stock items

Can we make the out of stock item non clickable, Right now all the items are being shown but we can not differentiate which is out of stock. Is anything possible to strike out and make non clickable if it is out of stock.

Composer not updated

When I try to install the newest version (0.6.4) for a Magento 2.3 project, composer tells:

[InvalidArgumentException]
Could not find package interjar/module-configurable-child-visibility in a version matching 0.6.4

Could you update composer?

Getting error

I'm getting an error, although I have changed my inventory setting to 'Display out of stock products' to 'Yes'. This is the error I am receiving:
screen shot 2018-08-29 at 12 20 06
I'm using Magento 2.2.2 CE.

Any ideas on how to resolve this issue fast?

Thank you!

Missed required argument stockConfig in parent::__construct call

Hello,

I'm trying to get this module working with Magento 2.3.4.

When trying to setup:di:compile I get:

Errors during compilation:
Interjar\ConfigurableChildVisibility\Plugin\Model\ResourceModel\Attribute\InStockOptionSelectBuilder
Missed required argument stockConfig in parent::__construct call

Any idea on how to get this fixed please?

Magento 2.4

Will support for Magento 2.4 be introduced? Or is this resolved in Magento core?

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?

Module requires non-existent dependency

I'm running Magento 2.3.4 and trying to install this via composer, I get the following error:

interjar/module-configurable-child-visibility 0.6.4 requires magento/module-configurable-product 101.*|102.* -> no matching package found

My version of module-configurable-product is 100.3.4; indeed it seems there is no 101 or 102 version of that module:

$ composer show "magento/module-configurable-product" --all
name     : magento/module-configurable-product
descrip. : N/A
keywords :
versions : * 100.3.4, 100.3.3, 100.3.2-p2, 100.3.2, 100.3.1, 100.3.0, 100.2.11, 100.2.10, 100.2.9, 100.2.8, 100.2.7, 100.2.6, 100.2.5, 100.2.4, 100.2.3, 100.2.2, 100.2.1, 100.2.0, 100.2.0-rc30, 100.2.0-rc23, 100.2.0-rc22, 100.2.0-rc21, 100.2.0-rc20, 100.1.18, 100.1.17, 100.1.16, 100.1.15, 100.1.14, 100.1.13, 100.1.12, 100.1.11, 100.1.10, 100.1.9, 100.1.8, 100.1.7, 100.1.6, 100.1.5, 100.1.4, 100.1.3, 100.1.2, 100.1.1, 100.1.0, 100.1.0-rc3, 100.1.0-rc2, 100.1.0-rc1, 100.0.12, 100.0.11, 100.0.10, 100.0.9, 100.0.8, 100.0.7, 100.0.6, 100.0.5, 100.0.4, 100.0.3, 100.0.2

Bug on Magento2.3.5

Hello!

Just upgraded from 2.2.8 to 2.3.5

[2020-09-16 13:21:36] main.CRITICAL:
Type Error occurred when creating object: Interjar\ConfigurableChildVisibility\Plugin\Model\ResourceModel\Attribute\InStockOptionSelectBuilder, Too few arguments to function Magento\ConfigurableProduct\Plugin\Model\ResourceModel\Attribute\InStockOptionSelectBuilder::__construct(), 1 passed in /home/bianchi/webapps/bianchidev/bianchi/app/code/Interjar/ConfigurableChildVisibility/Plugin/Model/ResourceModel/Attribute/InStockOptionSelectBuilder.php on line 34 and exactly 2 expected []

I think some modifications in the core of M2 broke on this version.

Please, take a look.

Graziano

v2.2.6 is breaking this module

Hey,

Like the title says, I updated my shop from 2.2.5 to 2.2.6 but from that point on this module doesn't matter on the product detail page anymore.

Is this known?

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.