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]: Inventory overview with multi-site/store and propagated products #3706

Open
white-lukas opened this issue Oct 3, 2024 · 2 comments
Open

Comments

@white-lukas
Copy link

What happened?

Description

I have the following site/structure setup

  • SiteGroup A -> Site A -> Store A -> Inventory location A
  • SiteGroup B -> Site B -> Store B -> Inventory location B

Both sites share the same product type but with a propagation method Save products to other sites in the same site group

When I now go to the Inventory overview (commerce/inventory/levels)
I see the Inventory location A as default, but it also tries to show the inventory items of the products from Site B
which is empty Image
Image
When trying to set the stock I can see it's a product from the other site, which doesn't exist on the currently selected site

In the breadcrumbs I can also both switch Sites as Inventory locations event when each site/store only has 1 inventory location.

I would expect to only see the inventory location which is mapped to the selected site and only the inventory items which are available for that selected site

Steps to reproduce

  1. create a site setup like described above
  2. create a product in each site
  3. go to the inventory overview

Expected behavior

  1. In the breadcrumbs only have the inventory locations that are assigned to the store
  2. See only the products that are created in the site instead of all (non) propagated variants

Actual behavior

You can select an inventory location which is not available for the selected site, this might lead to updating stock in the wrong location

Only see the variants that are available in the selected site instead of seeing a lot of blank entries

Craft CMS version

5.4.5

Craft Commerce version

5.1.3

PHP version

8.3.12

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 Oct 3, 2024

@lukeholder lukeholder self-assigned this Oct 7, 2024
@lukeholder
Copy link
Member

We have fixed the display bug of missing inventory item descriptions and SKU, when you have a site selected where those inventory items are not published.

Inventory management is independent of sites and stores, it is per location only, so the site switcher is only relevant to showing the inventory item's purchasable 'chip' with convenience links to edit the variant in that site.

We are considering removing the site switcher from that screen in the future but will keep it the same for now, and make improvements larger changes in the future.

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

"require": {
  "craftcms/commerce": "5.x-dev#41178349862cb6864088b6c0fd90eecd9cd3c349 as 5.1.3",
  "...": "..."
}

Then run composer update.

We will update this ticket once the release is out.

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

2 participants