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

Channels resolver per product #33

Closed
aleho opened this issue Jan 15, 2021 · 5 comments
Closed

Channels resolver per product #33

aleho opened this issue Jan 15, 2021 · 5 comments

Comments

@aleho
Copy link
Contributor

aleho commented Jan 15, 2021

If, for whatever reason, an import from a single Akeneo channel should be split for different Sylius channels (e.g. via attribute channel) there's currently no way to have different products land in different channels.

What's your opinion on this?
Shouldn't the ChannelsResolverInterface rather be a single ChannelResolverInterface operating per product instead of on all?

I might be able to draft a PR next week, if you agree.

(This is probably related to #2.)

@mmenozzi
Copy link
Member

Hi @aleho,
I don't understand, what do you mean?

The ChannelResolverInterface is called for every product and you can implement a custom one that resolve to different Sylius channels based on this channel attribute.

What do you think?

@aleho
Copy link
Contributor Author

aleho commented Jan 15, 2021

Yes, sorry, that was a bit fuzzy.

I meant: Would you accept a ChannelResolver (singuular) operating on each individual product, or would you recommend using a custom ValueHandler, effectively cancelling the behaviour of the ChannelsResolver (plural)?

@mmenozzi
Copy link
Member

No sorry I still don't understand. The channel resolver already operates on each individual product.

@aleho
Copy link
Contributor Author

aleho commented Jan 15, 2021

Hmm, am I a bit stupid I guess.

There's the ChannelsResolverInterface which gets an array of product.

I'm actually so used to seeing DTOs that my mind automatically parsed this as "array of product objects" not a product represented by an array.

Sorry for the noise!

@aleho aleho closed this as completed Jan 15, 2021
@mmenozzi
Copy link
Member

No problem @aleho!

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