EmicoEcommerce / Magento2TweakwiseExport

Magento 2 module for Tweakwise export
Other
1 stars 10 forks source link

Bundle product marked as in stock when required child product is out of stock #7

Closed sergiozt closed 1 year ago

sergiozt commented 1 year ago

Issue Brief

In this commits the the way how bundle product was calculated has been changed: https://github.com/EmicoEcommerce/Magento2TweakwiseExport/commit/ca075a7cb365542075d4f897c9623cc5fed471e6

Previously, when at least one required bundle product was out of stock, in the result of the calculation, the bundle product tself was also marked as out of stock, due to this code:
min($this->stockItem->getIsInStock(), ...array_column($optionGroups, 'is_in_stock'));

Environment

Steps to reproduce

  1. Install Magento from master branch.
  2. Set Magento setting "Show out of stock products" to "No"
  3. Create bundle product with multiple child products, set them as required.
  4. Set one of the required child product to out of stock, as well as bundle product itself.
  5. Export bundle products with that required children's products where at least one product is out of stock

Actual result

  1. Bundle product is exported

Expected result

List the expected results as a bullet list of expectations

  1. Bundle product is not exported