-
Notifications
You must be signed in to change notification settings - Fork 171
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
[4.x]: Out of stock product in cart causes problems, unable to update cart after this #3873
Comments
@jornwildenbeest can you confirm this is also an issue on Craft Commerce 4.8? The item that became out of stock should be removed from the cart and a notice placed on the order that it was removed due to being out of stock. If 4.8 doesn't fix it could you email your database backup, composer.json, composer.lock to [email protected] and reference this issue to us in support so we have context. Let us know the order number the issue is occurring on and we will try to reproduce. Thanks. |
@jornwildenbeest I was able to reproduce now! I have a potential fix here: #3878 But will need to do some more testing as it is a change in the way we recalculate the cart. I will update you here once we finalize on a solution. |
We have merged that PR to fix this, to be included in the next release. To get the fix early, change your "require": {
"craftcms/commerce": "4.x-dev as 4.8.0.1",
"...": "..."
} Then run We will update this ticket once the release is out. |
Hi This fix has been released in Commerce Thanks! |
The fix has also been included in Commerce Thanks! |
We have had to revert this fix in 5.3.2.1 and 4.8.1.1 due to it causing other issues. We will look into it more this week. |
What happened?
Description
When having a product in your cart that went out of stock, while you had it in your cart, it causes problems.
When you try to add another product to your cart, it always returns the "“{description}” is currently out of stock." and not adding the product o your cart.
Same goes for editing other line items in your cart, let's say you want to change the qty or delete another product, it is not possible because of this one product that is out of stock.
Steps to reproduce
Expected behavior
Actual behavior
You get an error that it is not possible to update your cart because that product is currently out of stock, but this is far from user friendly.
Craft CMS version
4.13.9
Craft Commerce version
4.7.2
PHP version
8.1
Operating system and version
Mac OS
Database type and version
Mysql 8
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: