shopware / frontends

Shopware Frontends is a framework for building custom, headless storefronts with Shopware 6.
https://frontends.shopware.com
MIT License
160 stars 43 forks source link

[DOCS] How to use Frontends with two (or more) SalesChannels? #359

Open BrocksiNet opened 11 months ago

BrocksiNet commented 11 months ago

Description

We need to document how a setup with Composable Frontends and two different SalesChannels can look like.

This documentation should also explain or have an example code for a basic store switcher.

Please also consider a way to only have one Frontend with multiple SalesChannels. Or write down if our suggestion would be to have Frontend for every SalesChannel and the reasons for that.

Also, give some hints about the language Switcher topic (e.g. setup: 2 SalesChannel and everyone with 2 Languages).

Use Case

Different products in different SalesChannels.

Proposed Solution

No response

Alternatives Considered

No response

Additional Context

Discussion in Slack Channel.

maximilian-schwarz commented 11 months ago

Very Interesting. Currently need the same use case.

jfrank325 commented 9 months ago

Yes, working on this as well.

I'm trying to use a middleware to achieve the desired result. It's not working, but would you recommend this as the correct approach or not? I thought using onConfigChange would make the most sense....

BrocksiNet commented 8 months ago

I created an internal Task (#NEXT-31405) to have some new Endpoint to give us all the needed Information to create a SalesChannel Switch. I will come back to this topic when the new Endpoint is there.

BrocksiNet commented 7 months ago

This may also be helpful for different peps: https://github.com/patzick/frontends-multiinstances-example