Field widget doesn't allow to set initial stock level if purchasable entity hasn't been created

Created on 13 September 2022, over 1 year ago
Updated 14 May 2024, 19 days ago

Problem/Motivation

When creating purchasable entities, the stock field widget currently doesn't allow to set a value. Instead it displays this description in the widget:

We have no valid data to process a stock transaction. This may happen if we cannot determine a store to which the entity belongs to.

This is only the case when using the product variation reference field widget in the product entity edit form. When creating new variations using the product variation entity form, the field widget works.

It would be nice from a UX perspective to be able to set a value when creating purchasable entities instead of having to edit it after creating it.

This issue seems to be related to this: πŸ“Œ Consider refactoring the stock level field to allow for initializing the stock level before a product variation is saved Fixed

Steps to reproduce

Visit the form to create a commerce product
The field widget displays the message mentioned above and doesn't provide a way to set the stock level.

Proposed resolution

Let users set a initial stock value

Remaining tasks

TBD

User interface changes

TBD

API changes

None

Data model changes

None

πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡­Switzerland Lukas von Blarer

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024