-
Notifications
You must be signed in to change notification settings - Fork 83
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
Property config for exporter causing incomplete exports #248
Comments
Hello, I managed to make the complete export for clients by re-declaring the required properties in services.yaml
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
src/Resources/config/services_export_json.yaml
sylius.exporter.customers.json uses the following array as config for the exportable properties of customer:
["Email", "Email_canonical", "First_name" , "Last_name" , "Birthday", "Gender", "Phone_number", "Subscribed_to_newsletter"]
src/Explorer/Plugin/ResourcePlugin.php - keysToExport
The method "addDataForId" registers properties of a resouce using entityManager->getClassMetadata.
This registers properties in camelCase. For example: "Email", "EmailCanonical", "FirstName", "LastName",...
src/Explorer/Plugin/ResourcePlugin.php - data
These key sets get compared in getData when hasPluginDataForExportKey gets called.
This ends up comparing "First_name" (keysToExport) to "FirstName" (data), which leads to first name not being exported properly.
The config is the same for spreadsheet and csv causing the same issue.
I am using the default config of the ImportExprtConfig.
friendsofsylius/sylius-import-export-plugin: 0.18.0
sylius/sylius: 1.8.8
doctrine/doctrine-bundle: 1.12.13
The text was updated successfully, but these errors were encountered: