umbraco / Umbraco.Commerce.Issues

18 stars 2 forks source link

Add "store per language variation" support #276

Open MichaelNielsenDK opened 3 years ago

MichaelNielsenDK commented 3 years ago

If you turn on "Allow vary by culture" on the Store Picker, you'll get the yellow box with the message:

Unable to locate an associated Store for this product. Please make sure you have added a Vendr Store Picker to your content root node. on all products.

The store is picked on the root node. I've also tried removing and adding the store again, but that did not help.

Umbraco 8.11.1 Vendr 1.5.1

mattbrailsford commented 3 years ago

@MichaelNielsenDK hmmm, we hadn't intended the store picker to be variable by culture really as this would mean you have 1:1 transaction setup and so products would invariably be within all sites.

Are you able to explain the use case and why you need a different store per culture?

MichaelNielsenDK commented 3 years ago

Our client has 3 languages, Danish, English and Dutch, and have a warehouse in each country, who will be in charge of handling the orders. So to avoid orders from all sites being mixed all together, we want them separated by language.

Danes handling danish orders, should only see danish orders, and the same for all other languages.

MichaelNielsenDK commented 3 years ago

I can add that the different languages will use their own local payment gateways, and separate accounting also.

mattbrailsford commented 3 years ago

@MichaelNielsenDK ok, hmm, yea, I could see that being useful 🤔

This could get quite interesting then as I'm not sure how far variants support will go into the prop editors. I could probably get the store picker to work and allow the price prop editor to work, but I don't think the stock prop editor will work as it stores the stock against the node ID of the product node and so would require some significant changes to also include the culture 🤔

RE culture specific payment gateways, those should be potentially configurable based on the culture already anyway by saying they aren't available in a given country.

mattbrailsford commented 3 years ago

I'm wondering if the best course of action, based on what is currently supported, is if all the orders were to go into a single store, but maybe something can be done to allow additional filtering of orders in some way such that you could ensure users for a given culture can only see orders in that culture.

Unfortunately I don't think this will solve the stock problem though 🤔

mattbrailsford commented 3 years ago

I think I might have to say that Vendr doesn't support a "store per language variant" setup right now and so this would be more of an enhancement request than a bug.

MichaelNielsenDK commented 3 years ago

Oh that's a shame. 🤔

I'll create a post on the forums on what to do to, because I feel like that would probably be a longer discussion, not directly relevant to this.

But regarding support for language variations then, from my point of view, the optimal setup would be this:

Store Picker Should be varied by culture, to be be used to set a store for each language, with underlying settings as default currency, country, tax and so on.

Price Should not be varied by culture, this would instead then be handled by currencies in Vendr.

Stock Should not be varied by culture, but could instead be handled by adding support of multiple stock locations.

Creating multiple stock locations would give you multiple stock fields (as with currency), where you enter a stock value for the individual location.

You should then set a default stock location on countries or regions, with the ability to activate fallback, where you select a prioritized list of fallback stock locations.

If fallback is not activated, the stock value is only from the individual stock location.

If fallback is activated, the stock value is a sum of the individual stock location and the selected fallback locations. Prioritization is used for from where the stock should be deducted when buying.

I hope the above makes sense. I'm not expecting this to be in the next version or anything 😅 I'm just spitballing, and hope it might be some value to you, and your considerations about whether it's something that should be added to Vendr.

mattbrailsford commented 3 years ago

@MichaelNielsenDK that's super valuable. Thank you for spending the time to put down your ideas. I hadn't thought about stock locations at all, so that's a really nice solution and a nice feature in and of itself.

This is definitely something I'd be happy to implement, I do just think I'll need to plan the stock side of things (this is already pretty complicated in what it does from a multi-variants perspective, but I'm sure this can be made to work), but it's a very cool solution.

Thank you 🙏