[Admin][Products] Edit product stock quantity
Description
Implement the feature to edit product stocks from the product show page.
Note: The generic stock edit has already been implemented, and part of that work could be reused here.
Features
- Allow stock modifications for the displayed or in-creation product directly from the product page.
Figma Design
@kennyadsl @tvdeyen hey guys, can you please clarify something about this section.
Do I understand correctly that it shows current master variant for the product? I assume so, because there is another section for variants, where all the other variants and their stock would be managed.
If the above is correct, please see the screenshot:
here I've mapped the attributes to the fields displayed, in case there are multiple stock locations.
However, backorderable is an attribute of a StockItem, so by the logic the switch should be displayed for each stock item in multiple locations?
I also think that it shows the master variant of the product in the screenshot above.
For the stock management page of all variants (and stock items) of a product I do not think a modal is the best interface tbh. With multiple variants and stock locations this can get very tedious. A spreadsheet like interface would probably be a better fit here.
Yep, that's the master variant.
@tvdeyen I don't think that's a modal, but a component embedded into the product edit page. Agree it needs to be reviewed, I guess the assumption made was to keep it as simple as possible because it's very rare not to use an external service for handling stock. I'm not totally against this view, to be honest, but looking forward for some other opinions.
cc @jarednorman what's your take here?
@tvdeyen yes, sorry for confusion, it's not a modal, but a section within product show (edit) page. You can see it better in Figma on this slide, along with "Variants" section (close to the bottom of the slide) which should display all variants for given product in a table layout. Form for variant add/edit is on this slide
I strongly believe that stock management should be a dedicated page/tab. Especially to your point @kennyadsl that it is often handled via third party.
We have a stock management page that already has been migrated to the new admin. Why not use that with the product pre-filtered via a simple link from the product form and just the "track inventory" checkbox? The product page is already cluttered with lots of forms which can be very overwhelming.
@tvdeyen I second thomas, I think we should invent a tab there for stock and variant management.
I looked at the figma and for me it just doesn't work:
- if I use solidus for stock management that's the most used feature
- I hardly ever change title, description, .... it damages SEO and there are only so many pictures to have
- to be absolutely honest if we wan't to do something right that nobody does do right right now: Product Detail View has an index page that tells me current stock and sales and allows me navigate to tabs for:
- Variant configuration, Price and Stock Management (has stock...)
- Stock itself (locations, quantit and quantity modification)
- SEO
- which ever I missed
This would give us something that nobody solved decedently and every merchant loves (even useless) data.