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

[5.x]: Stock does not save the first time after creating new product variant #3661

Open
WHITE-developer opened this issue Sep 6, 2024 · 5 comments

Comments

@WHITE-developer
Copy link

WHITE-developer commented Sep 6, 2024

What happened?

Description

When creating a new product variant and directly adding stock to it. It does not save the stock the first time.

Steps to reproduce

  1. Go to a product
  2. Click on 'New Product variant'
  3. Turn on the 'Inventory' switch and directly set the stock to 1
  4. Click on 'Create product variant'
  5. There are now changes made in the product entry, so click on 'Save and continue editing'
  6. After the reload, the stock of the newly created variant is back to 0 again.

Expected behavior

The stock in the newly created variant is saved correctly

Actual behavior

Craft CMS version

5.3.4

Craft Commerce version

5.0.16.1

PHP version

8.3.8

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

Copy link

linear bot commented Sep 6, 2024

@lukeholder
Copy link
Member

@WHITE-developer can you please confirm this is also happening on the latest release of Commerce 5.1.x ?

@lukeholder lukeholder self-assigned this Sep 13, 2024
@WHITE-developer
Copy link
Author

Hi @lukeholder, thank you for your reply. It looks good in Commerce 5.1.x.

@WHITE-developer
Copy link
Author

Hi @lukeholder, we checked again and it isn't fixed in the current 5.1.x versions.

We updated to commerce 5.1.3.
We created a new product variant and added stock directly to it. The stock was not saved the first time.

@white-lukas
Copy link

Some extra info, Product revisions are disabled,
When first creating the variant, and its still a draft the inventory is saved and also visible in the inventory overview and database, but after saving the product itself the inventory item is removed.

@lukeholder lukeholder reopened this Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants