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

How can I customize the importer / exporter? #242

Open
andychan94 opened this issue Aug 29, 2020 · 6 comments
Open

How can I customize the importer / exporter? #242

andychan94 opened this issue Aug 29, 2020 · 6 comments
Labels

Comments

@andychan94
Copy link
Contributor

Hello.
I want to add some fields to the importer and exporter, but I cannot figure out a way to extend & customize the plugin.
Are there any docs written about this anywhere? Or is there a PR I can refer to?
Thank you in advance!

@oallain
Copy link
Member

oallain commented Sep 4, 2020

Hello @andychan94

Have you find your answer ?
In the Readme we have some informations about exporter, you can find it here https://github.com/FriendsOfSylius/SyliusImportExportPlugin#a-real-example
In example, exported fields are in third position of arguments.

Regards

@cdarken
Copy link
Contributor

cdarken commented Oct 15, 2021

@oallain bumped into this requirement too. the instructions are clear enough, but I wanted to add support for Brand import, with loevgaard/sylius-brand-plugin.
If I understand correctly, I need to make my own product processor, right? But how do I add just a Brand retrieval and association like setBrand without rewriting your ProductProcessor class, as I cannot extend it, given that it's a final class?
I'm new at Symfony, but I found the parent service feature, should I use that?

@cdarken
Copy link
Contributor

cdarken commented Nov 14, 2021

Any suggestions here? Should I open a new issue?

@t-n-y
Copy link

t-n-y commented Mar 16, 2023

Hey,

Any update on that issue? I want to add field to the product export, but i can't extend ProductResourcePlugin as it's a final class. Any other simple solution ?

@lorenzo-shots
Copy link

lorenzo-shots commented Dec 14, 2023

Yes @t-n-y , if it's final you can't extend ProductResourcePlugin, but you could override it copying it in your src/ dir, modify the code parts to your needs and redefining the vendor one in the services.yaml with your overridden ProductResourcePlugin.

@t-n-y
Copy link

t-n-y commented Dec 14, 2023

@lorenzo-shots I know, my question was to avoid doing an override to every files i need to modify

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

No branches or pull requests

5 participants