Why not assign to Default channel automatically for each product created? This feature will avoid 500 error if the user forget to go over all the tabs while creating a product.
If this option won't be considerate, would be nice creating a front-end validation blocking form submit if the user forget to select the channel
Yeah i'd love this as an option. Maybe only applicable when there is 1 channel though. As you'd want people to be specific when there are multiple channels
We have a "enabled" field on the product that allows disabling it globally, so perhaps the logic should be: if no channels selected - available everywhere, if some specific channel selected - available only there. WDYT?
We have a "enabled" field on the product that allows disabling it globally, so perhaps the logic should be: if no channels selected - available everywhere, if some specific channel selected - available only there. WDYT?
I would rethink the channels logic completely. Current implementation gives some unnecessary complication in scope of product prices and some other logic which might (or might not) depend on channels. Why not to put channel "in line" as mandatory for all current channel-optionally-dependant things and reduce a complexity a lot by that? E.g. all product prices can depend on channel as mandatory and stored per channel always (now we have "generic" originPrice and price, while can also have a per-channel prices in json). If you've worked with Magento (and I think you have :)) then you know what i mean - there we have website-store-store view chain and even a single shop which runs on a certain magento instance lies down inside the scope of that trio chain. In case of Sylius I would do so that we put products & prices per channel level mandatory (linked to Default channel out of the box).
As a result, in our team we are now doing a serious e-commerce project based on your platform and we were forced to rethink the way of products-prices internal organisation and decided to go with own way of storing them per channel as mandatory (all of regular, discount, volume-based prices, etc). But now it looks like some kind of workaround with own price write/read/computation logic.
Off topic: Can't you use the pricing configuration for that @blacknoir, at least that is how I do different prices for variants based on channel (or customer groups). Since it's also based on unstructured configuration you can use anything you like. Just make sure you calculate the price through the calculator service.
On topic: I had the same problem and I introduced a selected channels context that will track what channels the current user is currently "working" with. When you create a new product, it will base the channels property of that product on the current selected channels by default. You could add this as a multi select drop down box in the admin UI for example. This has worked great for me and I think is still the best solution to work with multiple channels IMO.
The UI I use looks like this, and you can select multiple channels at once:

@steffenbrem yes, as explained, we customized the prices storing at own way but it is some kind of workaround (if we think of Sylius as some serious and mature platform). I was just trying to expand the initial request of this topic, so that to think of different global architectural approach and put a linking of such things as product pricing to channel as mandatory (so having product prices out of channel context will not be possible). Now (Sylius 0.19 we started with) we have some mess, seeing two prices at product level, also having per channel prices aside of main ones.
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.
stale bot is bad... :laughing:
I used the sylius.product.pre_create 鈩癸笍 event for setting automatically the channel and it works perfectly.
hey, at the actual version of sylius you can add product without chosen channel and also channel is on the first page/tab. so i close in issue as unactual. If you disagree with me feel free to reopen it 馃帀