EmicoEcommerce / Magento2TweakwiseExport-archived

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

Export only exporting products for a single store #135

Open bramstroker opened 2 years ago

bramstroker commented 2 years ago

Issue Brief

Since 4.2.0 products are only exported for a single store and not for all stores anymore in feed tweakwise.xml.

Environment

Steps to reproduce

  1. Have a Magento instance with at least 2 stores
  2. Enable tweakwise export for both stores
  3. Enable product for both stores
  4. Run tweakwise export (bin/magento tweakwise:export)

Actual result

Output of tweakwise export:

Feed written to /home/x/domains/x.x.x/application/releases/681/var/feeds/tweakwise.xml in 52.43s using 436Mb memory
Feed written to /home/x/domains/x.x.x/application/releases/681/var/feeds/tweakwise.xml in 60.07s using 446Mb memory

The feed is overwritten for each store. The tweakwise.xml feed only contains products from last store in the loop. And also navigator catalog only contains products from a single store after the feed is imported.

Expected result

The same feed is only written once and contains products for each store (with the store prefix).

This issue was introduced in https://github.com/EmicoEcommerce/Magento2TweakwiseExport/pull/131. Probably because the feed file is written in for loop now https://github.com/EmicoEcommerce/Magento2TweakwiseExport/pull/131/files#diff-b90eb706f19d8c58b8cf88c39b19ff51f63bd5759624dcadcb750f3bf218d34eR129.

I would suggest to revert this functionality and issue a new release urgently as the tweakwise export module is broken in current state imo. There were also 2 other major bugs which I discovered and were resolved already. But I think this whole functionality (seperate feed export per store) needs a lot more thorough testing to be production ready.

Unfortunately I cannot downgrade to 4.1.0 as our new shop is running on PHP 8.1

bramstroker commented 2 years ago

I just did some more checks and research. The problem is only with the console script bin/magento tweakwise:export behaving incorrectly. The implementation in the cronjob emico_tweakwise_export is correct. So when I run magerun2 sys:cron:run emico_tweakwise_export the feed is correctly generated.

koentjeh commented 2 years ago

We have tested it with version 4.2.2 including https://github.com/EmicoEcommerce/Magento2TweakwiseExport/pull/131/files and still face the same issue as described above.

kaplansin commented 2 years ago

Hi @koentjeh @bramstroker this issue has been fixed in this PR https://github.com/EmicoEcommerce/Magento2TweakwiseExport/pull/136

It has been merged into master (today) Most probably there will be new release soon.

bramstroker commented 2 years ago

Thanks @kaplansin

gerarddevisser commented 2 years ago

This is fixed in latest release tag: https://github.com/EmicoEcommerce/Magento2TweakwiseExport/releases/tag/4.2.3.