Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with feed generation with certain system attributes #283

Open
DKO-dS opened this issue Nov 18, 2020 · 3 comments
Open

Error with feed generation with certain system attributes #283

DKO-dS opened this issue Nov 18, 2020 · 3 comments

Comments

@DKO-dS
Copy link

DKO-dS commented Nov 18, 2020

  • FACT-Finder-Web-Components Magento2-Module version (see composer.json): NG latest
  • Magento edition and version: 2.4.0 Commerce
  • PHP version: 7.4
  • Expected behavior: After selecting all attributes in the section of "Select Additional Attributes" all of these attributes will be exported to the feed.
  • Actual behavior:
    After selecting these Magento system attributes the following error occurs:
    Notice: Array to string conversion in /srv/www/ci.myagrar.de/releases/32/src/vendor/omikron/magento2-factfinder/Model/Export/Catalog/AttributeValuesExtractor.php on line 45
    image

-- categories
-- Media Gallery
-- Tier prices

  • Steps to reproduce:
    Log inot backend
    configure factfinder export
    select at least one of these attriutes
    click on "Generate Export File(s) now"
@fmarangi
Copy link
Contributor

Hi @DKO-dS and thanks for your message. We are aware of the problem, in fact we added a validation of this in v2, see https://github.com/FACT-Finder-Web-Components/magento2-module/blob/release/2.x/src/Model/Export/Catalog/AttributeValuesExtractor.php#L47

On the other hand, why would a user want to export specifically these attributes? In case you need this data, it would be more appropriate to write a custom product field and handle the export there. These are special cases in Magento, and are not exported in general.

We were thinking about excluding some of the attributes from the selector, but again there is no real universal logic that we can use for it, so we did not proceed. Do you have any ideas on how to solve this in a pragmatic way?

@DKO-dS
Copy link
Author

DKO-dS commented Nov 24, 2020

Hi @fmarangi,

categories and tier prices are necessary.
Categories are used for searching and the filter navigation.
Tier prices are used for customer group prices.

Currently in the oxid version both will be transferred to Factfinder.

@fmarangi
Copy link
Contributor

Categories are already exported, see https://github.com/FACT-Finder-Web-Components/magento2-module/blob/master/src/Model/Export/Catalog/ProductField/CategoryPath.php

As for tier prices, you are right, but so far we had no real use case for it. Tier prices are in general not so trivial in Magento. In case you need this feature, we can develop it together and add this to the repo, but it will need a custom field anyway, since the format of this generic extractor would not work correctly in FF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants