Nothing Special   »   [go: up one dir, main page]

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]: Invalid purchasable ID in CP create order when order set to site with no products #3756

Open
bartdigitalpulse opened this issue Nov 8, 2024 · 2 comments

Comments

@bartdigitalpulse
Copy link

What happened?

Description

I have a setup of 8 sites (in admin/settings/sites) where 4 of them use commerce. So only 4 of them have products enabled for their site in admin/commerce/settings/producttypes. The primary site is a site that uses products and commerce.

When I start a new order in the CP the default selected site is a non commerce, non product site. It's probably sorted by Id? I would expect this to be primary site. Every time I start a new order I need to change it manually to the primary site.

When that first non commerce site is selected I'm still able to search products in the add line item. When I try to add them then I get the Invalid purchasable ID because the product is not available for that site.

Image

Steps to reproduce

  1. See above

Expected behavior

Set primary site as default order site.
Don't show products if they are not enabled for the current order site

Actual behavior

First site by id is the default order site.
You can search and display products even if they are not enabled for that site.

Craft CMS version

Craft Pro 5.4.10.1

Craft Commerce version

5.2.2

PHP version

8.2.6

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

@nfourtythree nfourtythree self-assigned this Nov 11, 2024
nfourtythree added a commit that referenced this issue Nov 11, 2024
…chasable-id-in-cp-create-order-when-order-set

Fixed #3756 purchasables incorrectly returning on order edit
@nfourtythree nfourtythree reopened this Nov 11, 2024
@nfourtythree
Copy link
Contributor

Hi @bartdigitalpulse

Thank you for bringing this to our attention.

We have pushed a fix for the issue which will be included in the next release of Commerce.

To get this early, change your craftcms/commerce requirement in your project's composer.json to:

"require": {
  "craftcms/commerce": "5.x-dev as 5.2.2.1",
  "...": "..."
}

Then run composer update.

Thanks!

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