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

Scope Admin Orders to Store #5614

Closed
jarednorman opened this issue Jan 23, 2024 · 4 comments
Closed

Scope Admin Orders to Store #5614

jarednorman opened this issue Jan 23, 2024 · 4 comments

Comments

@jarednorman
Copy link
Member

jarednorman commented Jan 23, 2024

Desired Behavior

When viewing the admin orders index, I should see only the orders for the current store.

Current Behavior

When viewing the admin orders index, I see all orders for all stores.

(Optional) Additional notes

I'm curious where we want to draw the line with multi-store support. What belongs in core and what belongs in solidus_multi_domain (which isn't in great shape at the moment.)

Given that the new admin shows the current store and orders are one of only a couple models that are tied to the store, should we be scoping the visible orders down to that store? It seems like it would be trivial to change by altering this line.

Another option would be adding the current store to the default search query on that page.

Thoughts?

@kennyadsl
Copy link
Member

Hey @jarednorman, thanks for reporting. How is it working currently on the legacy admin? Is the feature you are describing always available, or only combined with solidus_multi_domain?

@jarednorman
Copy link
Member Author

I've not got a store handy to test whether it works on solidus_multi_domain, but the legacy admin doesn't do it. This would be a functional change in the admin. I can see arguments both ways, but mainly I thought it seemed weird that the new admin navigation shows you what store you are viewing... but then doesn't scope the orders (or literally anything, as far as I know) down to that store.

@forkata
Copy link
Contributor

forkata commented Oct 10, 2024

The only records other than orders that seem to be scoped to store are payment methods and shipping methods. There is also a promotion rule that is used for filtering out orders from a store.

We made a small change to add a filter to the orders index by store. This replicates the behaviour in the legacy admin order search!

@jarednorman
Copy link
Member Author

I'm going to call this resolved then. I think some multi-tenant stores might need to do additional work here, but I don't think it makes sense for any of that to live within Solidus.

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

3 participants