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]: inventoryTracked field not being set #3400

Closed
johnnynotsolucky opened this issue Mar 5, 2024 · 1 comment
Closed

[5.x]: inventoryTracked field not being set #3400

johnnynotsolucky opened this issue Mar 5, 2024 · 1 comment
Labels
bug commerce4 Issues related to Commerce v4

Comments

@johnnynotsolucky
Copy link
Contributor

What happened?

Description

It looks like inventoryTracked field is not being set correctly when querying variants.

Steps to reproduce

  1. Fetch a Variant that has inventoryTracked set to true: $variant = \craft\commerce\elements\Variant::find()->inventoryTracked(true)->one()
  2. Note that $variant->inventoryTracked is false.

image

Expected behavior

inventoryTracked should be true.

Actual behavior

inventoryTracked is false.

Craft CMS version

5.0@beta.5

Craft Commerce version

Branch 5.0

PHP version

8.2

Operating system and version

No response

Database type and version

MySQL

Image driver and version

No response

Installed plugins and versions

@johnnynotsolucky johnnynotsolucky added commerce4 Issues related to Commerce v4 bug labels Mar 5, 2024
lukeholder added a commit that referenced this issue Mar 5, 2024
@lukeholder
Copy link
Member

lukeholder commented Mar 5, 2024

Thanks for reporting, this is fixed for the next release.

To get the fix early, change your craftcms/commerce requirement in composer.json to:

"require": {
  "craftcms/commerce": "5.0.x-dev#2de13df98e9b8a26faca4deb541e10db8f540556 as 5.0.0-beta.1",
  "...": "..."
}

Then run composer update.

Will update here once the next release is out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug commerce4 Issues related to Commerce v4
Projects
None yet
Development

No branches or pull requests

2 participants