EmicoEcommerce / Magento2TweakwiseExport-archived

Magento 2 module for Tweakwise export
Other
6 stars 16 forks source link

Error when exporting products in version 1.6.0 #89

Closed maxserv-woostelbos closed 4 years ago

maxserv-woostelbos commented 4 years ago

Issue Brief

We installed the new 1.6.0 version of the export to exclude "Out of stock" products from the export. When we run the export command the following error is trown:

Warning: min(): When only one parameter is given, it must be an array in [root]vendor/emico
  /tweakwise-export/src/Model/CombinedStock/Bundle.php on line 46

The line contains

$qty = min(...array_column($optionGroups, 'qty'));

When we use it like below it seems to work

$qty = min(array_column($optionGroups, 'qty'));

Environment

Steps to reproduce

  1. Run console command: 'bin/magento tweakwise:export'

Actual result

After running the command getting an error with the result there is no feed generated.

Expected result

After running the command getting a new export feed with only configurable product that are actually in stock (including check of the stock of the simple products).

edwinljacobs commented 4 years ago

Hi the proposed change has been released in https://github.com/EmicoEcommerce/Magento2TweakwiseExport/releases/tag/v1.6.1 $qty = min(array_column($optionGroups, 'qty')); is more robust then $qty = min(...array_column($optionGroups, 'qty'));

Thanks for pointing that out

edwinljacobs commented 4 years ago

Since this has been fixed and released we will close this issue.