-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Multiple stock location support #1545
Comments
Hi @michaelbromley |
@tufail it is planned for Vendure v2, which unfortunately I don't have a timeline for at the moment beyond "i want to release it this year". However, work on v2 has already begun and is available on the |
Hi @michaelbromley ! Any news about this feature? Thanks! |
Hi @asiz15, any news will be reflected in this issue - so I've not started working on this yet. So the idea with custom fields would be something like this:
|
Prior Art
Data ModelHere's a high-level outline of how I expect this to work: StockLocationOne or more This entity represents a physical location where stock exists. StockLevelThis entity represents the quantity of a given StockLocationStrategyWe'll need a strategy for defining:
Other details
|
Hi @michaelbromley! Could be these ideas related to have a strategy to look into a external inventory? Let's say our stock levels for X item go to 0 but I would like to check with our wholesalers' inventory (using an API) if they have availably for that item. |
@giovramirez That's a good point. Yes, I think the strategy method that returns available stock levels could also e.g. make an API call if nothing is in stock locally. |
@michaelbromley Can this issue be closed, since it's implemented in v2 beta? |
I will close it once the Admin UI parts are implemented. |
Ahh clear, my bad, thought that was already done 👌 |
Question, not sure if it belongs here, but: Let's say we want to track our inventory with an external service, like so: (In our custom StockLocationStrategy ) getAvailableStock(
ctx: RequestContext,
productVariantId: ID,
stockLevels: StockLevel[],
): AvailableStock | Promise<AvailableStock> {
return this.externalService.getStock(productVariantId)
} How would we then handle allocation? I would actually like that Vendure doesn't do anything with allocation, but rather have the external service handle saleable/allocated stock levels. Is this possible, or does Vendure always use the concept of allocation? |
@martijnvdbrug I think that's worth a separate issue. |
Is your feature request related to a problem? Please describe.
Currently each ProductVariant has a stockOnHand which represents the number of units in stock. Some businesses have multiple stock locations and it can be useful to be able to associate a stock level with a particular location. For example, this can allow the storefront to display the stock level at a given outlet.
Describe the solution you'd like
Allow the configuration of multiple stock locations, and each ProductVariant has a stock level at each location.
Describe alternatives you've considered
Some kind of custom solution using custom fields could probably be implemented already, but it would lack the first-class support for automatic stock tracking that is built in to Vendure.
The text was updated successfully, but these errors were encountered: